in reply to Check for next array element.
You can’t do that. For that case I suggest a foreach over the array’s indices:
foreach my $i ( 0 .. $#list ) { local $_ = $list[ $i ]; # ... $data->{ IS_LAST } = ( $i == $#list ); # ... }
Makeshifts last the longest.
|
|---|