Edward Wijaya wrote:
Is there anyway in Perl to create hash with multiple key for an
array?

Yes.

    my %HoA = ( key1 => [ @array1 ] );
    $HoA{key2} = $HoA{key1};

The purpose is as follows.

For example these lines:

AGCGGGGAG,AGCGGGGCG,AGCCGGGCG,AGCCAGGAG 15.188721875540
AGCGGAGCG,AGCCGAGGG,AGCGGAGGG           16.163408331891
\_____________________________________/ \_____________/
      @Array1                               $Key1

Is that an array with 7 elements? What do you mean by the scalar variable $Key1 that points to 2 numbers?

I want to store @Array1 under hash with $Key1 AND scalar(@Array1)
as $Key2.

Now I for one am lost.

Because later I need to sort the hash based on $Key1 and $Key2.

Does still not make sense to me.

Can you try to explain again what it is you want to know?

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to