Note that
if (my $node = shift @nodes) { $map{$node} = $pdu . '['.$pdu_num.']'; }
is not the same as the OP's code. Your code won't process the if if the first element of @nodes is false. Better to use
if (@nodes) { my $node = shift @nodes; $map{$node} = $pdu . '['.$pdu_num.']'; }
In reply to Re^2: More effective way to increase two elements of a list in parallel?
by FunkyMonk
in thread More effective way to increase two elements of a list in parallel?
by et_alia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |