-
Notifications
You must be signed in to change notification settings - Fork 578
new-style regexps #2166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From [email protected]This appears to be a bug involving new-style patterns for ----------------------- perl script: #!/usr/bin/perl $a = 'error-free'; ----------------------- output: 1 ----------------------- from perl -V: Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Characteristics of this binary (from libperl): |
From @mjdominus
In your example, you have
The regex does not contain any \Q..\E sequences, so no quotemeta $foo = 4; does not set $baz to '-4-'. This is normally what you want. Consider this example: print "Enter your name: "; Suppose the user enters the string \Q You would (or should) expect the output to be Hello, \Q! and it would be extremely bizarre for this program to print Hello, \! instead. But this is what you are asking for. The section "Gory details of parsing quoted constructs" in perlop |
Migrated from rt.perl.org#3461 (status was 'resolved')
Searchable as RT3461$
The text was updated successfully, but these errors were encountered: