note
swkronenfeld
With your first method<br>
<code>my $next_version_key = $ordered_list->[($i+1)]->[0]
if( $ordered_list->[($i+1)] );</code>
The <code>if</code> is evaluated first, comes out to false, and the <code>$ordered_list->[($i+1)]->[0]</code> is never evaluated.<Br><br>
With your second method, the <code>$ordered_list->[($i+1)]->[0]</code> is evaluated first. Even if this value does not exist, it is [id://493619|autovivified].
535403
535403