<<SNIP>>

> >  # or, since [EMAIL PROTECTED] will always be the index of the last 
> element of 
> > the
> > array:
> >  print $a->[-1]
> > 
> > 
> > Did I get it right?  That looks like homework to me ... Why 
> would you 
> > ever do that in a practical script?
> > 
> > --Errin
> > 
> 
> I think you got it. Ever want the last item in a list, I can think of 
> lots of reasons to want that...
> 
> http://danconia.org
> 

Yeah.  I agree.  However, I always use the $ARRAY[-1] (or,
$ARRAYREF->[-1]) syntax to get at the last element.

Why would I ever type: [EMAIL PROTECTED] ?!?

Btw ... What perldoc can I read to read about '$#'?

--Errin

--
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