in reply to Re: Re: Perl's Bad Ideas
in thread Perl's Bad Ideas

Is it just me, or does it not seem like @array.last should return the last element of the array, rather than the index of the last element?

Replies are listed 'Best First'.
Re: Re: Re: Re: Perl's Bad Ideas
by demerphq (Chancellor) on Apr 15, 2002 at 14:53 UTC
    And there I was thinking that TheDamian suggesting it would probably be @array.end over @array.last because of the saved char...

    But more (or less :-) seriously, if @array.last did return the last element (i guess it would be an alias for  @array[-1]) would there also be an @array.first?

    Yves / DeMerphq
    ---
    Writing a good benchmark isnt as easy as it might look.