#!/usr/bin/perl -w use strict; my @a = qw( 1 2 3 4 5 ); my @b = qw( a b c d e ); my %h = map { $a[$_] => $b[$_] } ( 0..$#a ); print "$_ => $h{$_}\n" foreach sort keys %h;
In reply to Re: Merging arrays into a hash
by marcink
in thread Merging arrays into a hash
by pazuzu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |