Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^2: grep flip flop (range operator)

by Anonymous Monk
on Sep 13, 2012 at 07:04 UTC ( #993384=note: print w/ replies, xml ) Need Help??

in reply to Re: grep flip flop (range operator)
in thread grep flip flop (range operator)

Edit: Upon further reading, it looks like the range operator isn't parsed in scalar context, as the following does print something: perl -le " print for grep scalar 1 .. /Q/, @ARGV " a b c Q r s

I use    perl -MO=Deparse,-p   what you have is  (scalar(1) .. /Q/)

you need  scalar( 1 .. /Q/ ) to get nothing :)

Comment on Re^2: grep flip flop (range operator)
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2016-02-07 17:31 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (255 votes), past polls