Re: RFC 212 (v1) Make length(@array) work

[email protected] ((Randal L. Schwartz)) 20 Sep 2000 15:15:20 -0700
Newsgroups perl.perl6.language.subs
Message-ID <[email protected]>
>>>>> "Bart" == Bart Lateur <[email protected]> writes:

Bart> So length is already picky on what it accepts. You need to turn it into

Bart> 	print length(scalar(@a, 'this is a string'));

Bart> to get perl to accept it.

And then what it's accepting is the scalar-comma operator, giving you
the length of "this is a string".  Not 2.  Not the length of "2". :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!