in reply to Re: Re: Re: Re: Making a hash of making a hash of an array
in thread Making a hash of making a hash of an array

Consider this instead:
my @array = (1..20); my $i = 0; for (@array) { print "$_\n"; last if ++$i >= 10; }
This is one of the jobs that last was built for. Now consider this one:
my @array = (1..20); print "$_\n" for @array[0..9];
That's called an array slice, another tool that seperates Perl from C. Play around with these two snippets. You'll learn something. ;)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)