Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: why the array index has to start at 0??

by citromatik (Curate)
on Jun 23, 2009 at 10:17 UTC ( #773942=note: print w/ replies, xml ) Need Help??


in reply to why the array index has to start at 0??

It hasn't:

use strict; use warnings; use feature qw/ :5.10 /; my @ar = qw/1 2 3 4 5/; $[=1; say $ar[$_] for (1..@ar);

Although you may not want to do that. See perlvar

citromatik


Comment on Re: why the array index has to start at 0??
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2014-07-31 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (254 votes), past polls