in reply to Perl's Bad Ideas

Yup. Ranks right up there with $[ (the array base index variable)...

In fact, if you didn't have $[, you probably wouldn't need $#var...

$ perl -e'@a=qw(a b c); print "$#a\n"; $[=3; print "$#a\n"' 2 5
Yuck.
--
Mike

Replies are listed 'Best First'.
Re: Re: Perl's Bad Ideas
by Dog and Pony (Priest) on Apr 06, 2002 at 22:05 UTC
    Well, I thought that $[ was deprecated, or as perldoc perlvar puts it: "Its use is highly discouraged.".

    So I guess that one will be gone soon at least... :)


    You have moved into a dark place.
    It is pitch black. You are likely to be eaten by a grue.