in reply to Last Element of Hash
my @keys = keys %hash; foreach my $i (0 .. $#keys) { my $element = $keys[$i]; if ($i == $#keys) { #do this } else { #do that } }
*shrugs* There's a bazillion ways to do it.
------
We are the carpenters and bricklayers of the Information Age.
The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|