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
/x does not ignore commented slashes. #2037
Comments
From krolnik@lsil.comThis is a bug report for perl from krolnik@lsil.com, # Here are three forms of regular expressions $a =~ s/c|d|e//x; $a1 =~ s/c # # The above two do fine - parse correctly. $a2 =~ s/c # / This similar example (differing in 1 character) causes parsing Unquoted string "x" may clash with future reserved word at /tmp/spl line 16. The slash at the end of the first line of the regular expression Site configuration information for perl 5.00503: Configured by greg at Thu Oct 7 17:35:08 CDT 1999. Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Locally applied patches: @INC for perl 5.00503: Environment for perl 5.00503: |
From [Unknown Contact. See original ticket]This is a bug report for perl from krolnik@lsil.com, # Here are three forms of regular expressions $a =~ s/c|d|e//x; $a1 =~ s/c # # The above two do fine - parse correctly. $a2 =~ s/c # / This similar example (differing in 1 character) causes parsing Unquoted string "x" may clash with future reserved word at /tmp/spl line 16. The slash at the end of the first line of the regular expression Site configuration information for perl 5.00503: Configured by greg at Thu Oct 7 17:35:08 CDT 1999. Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Locally applied patches: @INC for perl 5.00503: Environment for perl 5.00503: |
From [Unknown Contact. See original ticket]
All is correct - you try to divide s/// by x. Vadim. |
From [Unknown Contact. See original ticket]Annoying, but as documented: see the perlre man page. Basically, |
From [Unknown Contact. See original ticket]Dominic Dunlop <domo@computer.org> wrote
It's worse than that. Examples of this sort are actually ambiguous, Mike Guy |
From [Unknown Contact. See original ticket]"Fixing" this is not just not a case where the gain is not worth the pain, Consider the following code: if ($foo =~ /#/) { How should that be parsed? Cheers, |
From @iabynnot-a-bug |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#3315 (status was 'resolved')
Searchable as RT3315$
The text was updated successfully, but these errors were encountered: