Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 chanting in the Monastery: (6)
As of 2015-07-04 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls