Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Common Perl Idioms

by demerphq (Chancellor)
on Jul 23, 2004 at 20:09 UTC ( [id://376982]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Common Perl Idioms
in thread Common Perl Idioms

Well I'm not so sure how important that is, especially as it loses useful and already obtained information (ie the count). Also for the canonical return isn't 0 < grep better? It would also return the canonical true/false but is only a single operator...


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi


Replies are listed 'Best First'.
Re^4: Common Perl Idioms
by ysth (Canon) on Jul 23, 2004 at 20:12 UTC
    Ah, but !! is an idiom, and more readily recognizable to my eyes. With 0< it takes me a second to figure out what the code is trying to compare. In any case, 0 < has to load a constant then do a compare, so it's still two ops.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found