in reply to Dynamic array names
No big shakes in Perl to do this, but you need to read up on references (perldoc perlref and perldoc perlreftut; in hard copy, I recommend Efficient Perl Programming). What you (probably) want is an *array* of references to arrays.
my @list_of_arrays; foreach (Thing) { # get array from thing push @list_of_arrays, \@array; } # to get at the arrays foreach my $array (@list_of_arrays) { # $array is a reference to an array foreach (@$array) { # etc } }
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: Dynamic array names
by tilly (Archbishop) on Feb 09, 2001 at 23:24 UTC | |
by arturo (Vicar) on Feb 09, 2001 at 23:30 UTC | |
by Fastolfe (Vicar) on Feb 10, 2001 at 02:12 UTC | |
by tilly (Archbishop) on Feb 10, 2001 at 02:37 UTC | |
by Fastolfe (Vicar) on Feb 10, 2001 at 03:07 UTC | |
| |
by tilly (Archbishop) on Feb 09, 2001 at 23:48 UTC |