Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Array mysteriously growing

by swkronenfeld (Hermit)
on Mar 09, 2006 at 15:17 UTC ( [id://535408]=note: print w/replies, xml ) Need Help??


in reply to Array mysteriously growing

With your first method
my $next_version_key = $ordered_list->[($i+1)]->[0] if( $ordered_list->[($i+1)] );
The if is evaluated first, comes out to false, and the $ordered_list->[($i+1)]->[0] is never evaluated.

With your second method, the $ordered_list->[($i+1)]->[0] is evaluated first. Even if this value does not exist, it is autovivified.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-18 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found