in reply to Last Element of Hash
my $last = (keys %hash)[-1]; foreach my $element (keys %$hash) { if ($element eq $last) { #do this } else { #do that } }
I just added this as just something to play with. I don't think I'd ever use it in production code myself.
|
|---|