This way they remain associated if you need them again...use strict; use warnings; my @num = qw (1 2 3 4 5); my @alp = qw (A B C D E); my %numalp; # # Build the hash... # for my $index (0 .. $#num) { $numalp{$num[$index]} = $alp[$index]; } # # Print it # foreach (sort(keys(%numalp))) { print("numalp\[$_\]\[$numalp{$_}\]\n"); }
In reply to Re: Concordance Printing of Two Arrays
by NateTut
in thread Concordance Printing of Two Arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |