Think about Loose Coupling | |
PerlMonks |
Re^2: grep flip flop (range operator)by Anonymous Monk |
on Sep 13, 2012 at 07:04 UTC ( [id://993384]=note: print w/replies, xml ) | Need Help?? |
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 :)
In Section
Seekers of Perl Wisdom
|
|