Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: A variable name in a regex comment triggers a warning

by mrborisguy (Hermit)
on Dec 24, 2006 at 22:39 UTC ( [id://591544]=note: print w/replies, xml ) Need Help??


in reply to A variable name in a regex comment triggers a warning

Inside the regex, '#' doesn't start a comment.

print ("#7" =~ /#/);

    -Bryan

Replies are listed 'Best First'.
Re^2: A variable name in a regex comment triggers a warning
by imp (Priest) on Dec 25, 2006 at 00:44 UTC
Re^2: A variable name in a regex comment triggers a warning
by ysth (Canon) on Dec 24, 2006 at 22:41 UTC
    Yes, it does, sometimes:
    $ perl -wle'print("%7" =~ /(?x)#/)' 1

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://591544]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found