Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Secret Perl Operators: the boolean list squash operator, x!!

by eric256 (Parson)
on Jul 31, 2006 at 17:47 UTC ( #564821=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Secret Perl Operators: the boolean list squash operator, x!!
in thread Secret Perl Operators: the boolean list squash operator, x!!

Update: Never mind, i see it now ;P)

Why would that be trouble?

use strict; use warnings; use Data::Dumper; my $hash = { test => 1}; print Dumper($hash); print "Hello\n" x!! exists($hash->{test}); print Dumper($hash); print "One More\n" x!! exists($hash->{test2}) && exists($hash->{test2} +->{Dude}); print Dumper($hash);

That works as expected and doesn't autovivify anything...did I miss something?


___________
Eric Hodges


Comment on Re^4: Secret Perl Operators: the boolean list squash operator, x!!
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://564821]
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 2014-08-30 04:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls