http://qs321.pair.com?node_id=11140749


in reply to Perl's feature to determine, in current point of loop, that this is the last one?

You could always watch for the last value in the list and test for that ..

my @values = qw/red green brown blue/; foreach my $v ( @values ) { if ( $v eq $values[-1] ) { # Last value } else { # All other values } }
As you've already heard, there's nothing built in to Perl that handles that.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.