>I have 2 arrays I would like to make into a (one) hash.
>
>One array for keys.
>One array for values.
>
>I'm sure this may be an easy thing, but my lack of imagination is killing me
>(and I need something a little more comprehensive than Beginners Perl)
A quick easy way to do it given @keys (array of keys) and @values
(array of values):
@hash{@keys} = @values;
This will set up the key/value pairs in %hash.
---Larry
+------------------------------------------------------------------------+
| Larry Coffin, G.P.H. Watertown, MA |
| http://www.PointInfinity.com/lcoffin/ [EMAIL PROTECTED] |
+------------------------------------------------------------------------+
"The only real way to look younger is not to be born so soon."
-- Charles Schulz, "Things I've Had to Learn Over and
Over and Over"
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]