in reply to Last Element of Hash
To me, it's easier to see it that way... I'm still rather "young" on Perl :-)my @elements = ( keys %hash ); foreach (@elements){ if ( $_ eq $elements[-1] ){ #Do something to last element }else{ #Do something to an item in element } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Last Element of Hash
by bart (Canon) on Sep 26, 2003 at 13:26 UTC | |
by LazerRed (Pilgrim) on Sep 26, 2003 at 14:42 UTC |