[plug] [Perl] Hello gurus
levsky at rave.iinet.net.au
levsky at rave.iinet.net.au
Fri Jan 3 09:03:16 WST 2003
On Fri, Jan 03, 2003 at 08:55:31AM +0800, Patrick Tehvand wrote:
> Guys,
>
> I think that for array: @test , $#test would indicate the last scalar (ie
> @test[last number]in the array. (please correct me if i am wrong there)
$#test is the index of the last element of the array. Hence, you
get that scalar out with $test[$#test];
> Id there a way I can indicate the 2nd last scalar in the array?
$test[$#test-1]; (assuming there's more than one element in the array)
--
Do not look into laser with remaining eye.
More information about the plug
mailing list