#!/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[$_]; }
In reply to Re: How to make a hash out of two arrays,one with keys and other with values?
by bichonfrise74
in thread How to make a hash out of two arrays,one with keys and other with values?
by sun@icgeb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |