Re: proposed addition to perlvar

[email protected] ("Chas. Owens")
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
On Wed, Jun 9, 2010 at 11:58, The Sidhekin <[email protected]> wrote:
>
>
> On Wed, Jun 9, 2010 at 5:51 PM, Chas. Owens <[email protected]> wrote:
>>
>> Perhaps changing
>>
>> C<$#> is also used as sigil, which, when prepended on the name of an
>> array gives the index of the last element in that array.
>>
>> to
>>
>> C<$#> is still allowed to be used as sigil, which, when prepended on
>> the name of an array gives the index of the last element in that array.
>>
>> would clear this up?
>
>   It's not just symbolic ("name") use though:
>
> sidhekin@blackbox[17:57:31]~$ perl -le 'print $#{[qw/a b c/]}'
> 2
> sidhekin@blackbox[17:57:33]~$ perl -le 'print $#{\@ARGV}' a b c d
> 3
> sidhekin@blackbox[17:57:35]~$
>
>
>   Sweet, huh? :)
>
>
> Eirik
>

Crap, it is always the details that kill you.  So it should be

C<$#> is also used as sigil, which, when prepended on the name of an
array or applied to an array reference gives the index of the last
element in that array.

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.