Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: Little annoying mistakes ... of others

by jeffa (Bishop)
on Dec 29, 2008 at 14:16 UTC ( #733034=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Little annoying mistakes ... of others
in thread Little annoying mistakes ... of others

I think this:

print "$arg matches\n" if grep $arg, @valid;

Is equivalent to this:

print "$arg matches\n" if grep { $arg } @valid;
So as long as @valid and $arg are not false, then the match will also be true. (If $arg is 0 (zero) then the second example will not always be true.)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)


Comment on Re^4: Little annoying mistakes ... of others
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2015-07-28 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls