Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Getting Matching Items From An Array

by hardburn (Abbot)
on Jul 06, 2004 at 14:55 UTC ( #372117=note: print w/ replies, xml ) Need Help??


in reply to Re: Getting Matching Items From An Array
in thread Getting Matching Items From An Array

exists still autovivifies in some situations:

use Data::Dumper; my %h = ( foo => 1 ); print "Exists" if exists $h{bar}[2]; print Data::Dumper::Dumper \%h; __END__ $VAR1 = { 'bar' => [], 'foo' => 1 };

Which probably isn't the right thing to do.

----
send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.


Comment on Re^2: Getting Matching Items From An Array
Download Code
Replies are listed 'Best First'.
Re^3: Getting Matching Items From An Array
by Grygonos (Chaplain) on Jul 21, 2004 at 20:21 UTC
    It should only autoviv that array element if the hash key is already defined IMHO...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2015-07-08 01:02 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 (93 votes), past polls