in reply to Should I use $ and $# ?
Hi Guildenstern,
Everyone has pretty much covered the basic info regarding $[ and $#, but I wanted to point out that $# is depreciated with regards to the output format of numbers, and NOT for lists. $#LIST still returns the index of the last element of a list, and is not depreciated at all! $#LIST is the equivalent of scalar(@LIST)-1 and somewhat faster, I believe.
With regards to Perl 6, expect many features and functions to be changed or completely removed. I have been following the RFCs and the language mailing list, and I believe that a pretty hefty Perl 5 to Perl 6 translator is planned. :-) So you should really only be worried about compatibility with future version of Perl 5, and I daresay that Perl 5 isn't going to change much after 5.6.
Best of luck,
Alakaboo
|
|---|