Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: perl regular expressions and empty strings unexpected results

by Anonymous Monk
on Jan 23, 2012 at 10:19 UTC ( #949357=note: print w/replies, xml ) Need Help??


in reply to perl regular expressions and empty strings unexpected results

Perl comes with B::Deparse
$ perl -e " print ''=~/.*/ and ''=~/bar/ " 1 $ perl -MO=Deparse -e " print ''=~/.*/ and ''=~/bar/ " '' =~ /bar/ if print '' =~ /.*/; -e syntax OK $ perl -MO=Deparse,-p -e " print ''=~/.*/ and ''=~/bar/ " (print(('' =~ /.*/)) and ('' =~ /bar/)); -e syntax OK

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2023-12-05 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (27 votes). Check out past polls.

    Notices?