Vladimir D Belousov <[EMAIL PROTECTED]> asked:
> I beg your pardon, but why $myvar[$#mmyvar] is the first 
> element of array?

Because $#mmyvar is 0 - and if you "use warnings;" Perl will
tell you that @mmyvar is undeclared. If you use $myvar[$#myvar],
it will print the last element. Better yet, use $myvar[-1].

HTH,
Thomas


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to