in reply to Re: Re: Re: where to look up "funny looking" perl notation (and an example)
in thread where to look up "funny looking" perl notation (and an example)

Read perldoc perldata again!

Version 5 of Perl changed the semantics of $[: files that don't set the value of $[ no longer need to worry about whether another file changed its value. (In other words, use of $[ is deprecated.) So in general you can assume that
scalar(@whatever) == $#whatever + 1;

  • Comment on Re: Re: Re: Re: where to look up "funny looking" perl notation (and an example)

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: where to look up "funny looking" perl notation (and an example)
by Gilimanjaro (Hermit) on Jan 21, 2003 at 20:57 UTC
    Very true! But I still felt the history was relevant, as it sort of explains why the $# exists at all... And one could still use it, if one wanted to... (Notice the repetitive usage of the word 'one' in this context ;) )