Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Perl's Bad Ideas

by trs80 (Priest)
on Apr 06, 2002 at 00:07 UTC ( [id://157086]=note: print w/replies, xml ) Need Help??


in reply to Perl's Bad Ideas

I believe one of its intended purposes was to allow for predefining the length of an array. So the '#' is symbolic of, 'number' of elements you want it to have:
use Data::Dumper; my @test; $#test = 20; print Dumper(\@test); print $#test , "\n";
When used in a void syntax (verbiage?) it simply returns the current number of elements.

That doesn't mean I like it anymore or less then you do.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://157086]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-24 03:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found