in reply to array question
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 Section
Seekers of Perl Wisdom