Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Perl-Sensitive Sunglasses

Comment on

Depending on context this will return different things, whereas !!expr will always return a boolean value.
This will return the number of elements returned by grep as opposed to !!expr which, again, will return a boolean value.

Of course both of the above are valid in appropriate situations, but if you just want a boolean value then !!expr is an appropriate idiomatic solution.



In reply to Re^2: Perl Idioms Explained - !!expr by broquaint
in thread Perl Idioms Explained - !!expr by broquaint

and:  <code> code here </code>

  • Please read these before you post! —
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (8)
    As of 2013-12-20 08:48 GMT
    Find Nodes?
      Voting Booth?

      How do you parse XML?

      Results (418 votes), past polls