How would I use map to accomplish the same thing?#!/usr/bin/perl -w use strict; my @array1 = qw(a b c); my @array2 = qw(1 2 3); my %hash; for(0..$#array1){ $hash{$array1[$_]}=$array2[$_]; }
In reply to mapping two arrays into a hash by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |