Is there possible to create a n-number of lists in a cycle?
I.e. for (1..$n){
my @R.$_;
}
or smth like this ... I know that 'my' will work only in this loop. So i am
waiting for the answer.
Consider this example:
use strict;
my $n = 3;
my %hash;
for (1 .. $n){
$hash{$_} = [ ... ];
}
Now you could access the first list's elements by:
print @{$hash{1}};
and the second is the same...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>