develooper Front page | perl.perl5.porters | Postings from January 2018

Re: RFC: deprecate literal \v in patterns except under /x; /[#]/xx

Thread Previous | Thread Next
Tom Molesworth via perl5-porters
January 1, 2018 10:27
Re: RFC: deprecate literal \v in patterns except under /x; /[#]/xx
Message ID:
On 1 January 2018 at 04:31, Karl Williamson <> wrote:
> I am proposing two deprecations
> First, using literal vertical space, such as a form feed or new line, in a regular expression pattern unless that pattern is /x.  My guess is that this is extremely uncommon, and that just about all such occurrences would be from forgetting the /x.  So deprecating this should affect hardly anyone.  The reason I believe it is uncommon is that when displayed the pattern would look something like this:

Just to be clear, this would affect cases like this?

my ($name, $description) = m{
=head1 NAME

(\S+) - (.*)


If so, that seems very inconvenient. I've seen (and used) literal \n
in non-/x regex quite often.

Are there benefits aside from the "maybe you wanted /x" warning?

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About