"be consistent" | |
PerlMonks |
Re^2: Get Element inArrayby K_M_McMahon (Hermit) |
on May 25, 2005 at 02:54 UTC ( [id://460222]=note: print w/replies, xml ) | Need Help?? |
gopalr said my $res=@arr[-2] I think you mean my $res=$arr[-2]; If you have warnings turned on (which we all should!) it doesn't like the @arr[-2] method. When referring to a scalar element of an array you should specify that it is scalar with $ -Kevin
In Section
Seekers of Perl Wisdom
|
|