in reply to How to make a hash out of two arrays,one with keys and other with values?

Another way...
#!/usr/bin/perl use strict; my %hash; my @one = qw( a b c d ); my @two = qw( 1 2 3 4 ); for (0 .. $#one) { $hash{$one[$_]} = $two[$_]; }
  • Comment on Re: How to make a hash out of two arrays,one with keys and other with values?
  • Download Code