You can use the slice syntax to get a set of array elements:
my @array = (0 .. 50); my @first5 = @array[0..4]; my @allButFirst = @array[1..$#array]; my @FirstThirdAndEighth = @array[0,2,7];
For details, read perldoc perldata and look for "slice" to find information about array and hash slicing.
...roboticus
In reply to Re: array question
by roboticus
in thread array question
by gogoglou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |