Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Weird grep behaviour

by naikonta (Curate)
on Oct 17, 2007 at 07:36 UTC ( #645388=note: print w/replies, xml ) Need Help??


in reply to Re: Weird grep behaviour
in thread Weird grep behaviour

It's not about comparison, BLOCK and EXPR are evaluated in boolean context. From OP's sample code, in grep($var1, @arr1), $var1 is always true.

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://645388]
help
Chatterbox?
[Corion]: I'm afraid that I'll turn off dk some day with all my bug reports or stuff that could be documented better ;-)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2016-12-09 09:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (150 votes). Check out past polls.