in reply to Re: Variable as name of array
in thread Variable as name of array
Right?my @names = qw(A B C D); my %order = (); for(my $i=0; $i<4; $i++) { $order{$names[$i]} = $names[$i]; } while ((my $key, my $value) = each(%order)){ print $key.", ".$value."\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Variable as name of array
by johngg (Canon) on Nov 01, 2012 at 22:50 UTC | |
by choroba (Cardinal) on Nov 01, 2012 at 22:56 UTC |