jet speed wrote:
Hi,

Hello,

I have a query on converting arrays into hash.Please could you help me
resolve the below.

I have 2 arrays as bleow.

@array1 = ( D_101 D_102 D_103 D_104);
@array2 = (0 1 2 3);


How can i convert both of these arrays into %hash, assigining the
@array1  as keys and @array2 as values.

@hash{ @array1 } = @array2;


How can I recall only certain keys and their corresponding values of hashes
ex : if D_103 then print " D_103 value is 2"
ex :if D_101 then print "D_101 value is  0"

Please be more specific.



John
--
Those people who think they know everything are a great
annoyance to those of us who do.        -- Isaac Asimov

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to