in reply to array manipulation
"I don't know if it is zero based like array indices are or if it is one-based"
Why don't you just try it and see?
Do that, and it should be obvious :)my @foo = qw/1 2 3 4 5 6/; print "Index 1 is $foo[1]\n";
Update: duh, that was a really poor example, given that your question is about splice. Here is a better example:
my @foo = qw/1 2 3 4 5 6/; my @bar = splice @foo, 1,2; print "Indexes 1 & 2 are @bar\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: array manipulation
by Transient (Hermit) on Jun 15, 2009 at 16:24 UTC |