in reply to How to accees this in perl?

Try formatting your questions please.

If I understand your question correctly:

First, you need to convert @ar_2 into a hash.
my %hash = @ar_2;
Then you need to access the hash for the elements of @ar_1
@hash{@ar_1};

Replies are listed 'Best First'.
Re^2: How to accees this in perl?
by chakram88 (Pilgrim) on Jan 31, 2008 at 18:08 UTC
    It is pretty hard from the OP to identify exactly what taj is looking for --- but simply turning @ar_2 into a hash: my %hash = @ar_2 won't work in this case.

    It appears that the values of the keys (at least some of them) are actually going to be a list:

    @ar_2 is a hash also in whihc 1001 value is "a" and "s" 1002 value is " d" and "r" etc.

    Simply copying to a hash would yield only one (the last) result per key.

    So, a map or loop of some sort would be needed to assign the list of values to each key. I leave that as an exercise for the OP, who didn't provide us with an inkling of what effort was already put forth.