Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: A more concise way to map the contents of an array.

by Amblikai (Scribe)
on Dec 30, 2012 at 13:59 UTC ( #1010922=note: print w/replies, xml ) Need Help??


in reply to Re^3: A more concise way to map the contents of an array.
in thread A more concise way to map the contents of an array.

So just to be clear, if i double negate something, i'll lose the original "value" and be left with the pure boolean representation of the data? That could prove useful!

Thanks again for your reply!

  • Comment on Re^4: A more concise way to map the contents of an array.

Replies are listed 'Best First'.
Re^5: A more concise way to map the contents of an array.
by Athanasius (Canon) on Dec 30, 2012 at 14:42 UTC

      Thanks for the welcome and the info!

Re^5: A more concise way to map the contents of an array.
by LanX (Chancellor) on Dec 30, 2012 at 14:03 UTC
    Yes ... negating means evaluating in boolean context!

    (well "pure" is a risky adjective in the sphere of Perl's DWIM flexibility ... ;)

    Anyway if this approach ever fails it certainly is a bug!

    EDIT:

    IMHO people prefer using 0 for false because it's easier to print and read than an empty string. But technically this is not necessary.

    Cheers Rolf

    ) lets say "well-defined"!

      Ok, thanks again for your help!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2016-08-31 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (427 votes). Check out past polls.