Hi,
I have an array like this:
I want to retrieve the words that corresponds to that id.
I tried removing duplicates and getting the words but it didn't work!!!
Here is the code:
I want the ouput like this:
How can i get the words?
Regards
Archana
I have an array like this:
Code:
@arr="(mouse 18340633 sperm 18340633 proteome 18340633 strip 18340633 Role 18184912 insulator 18184912 )";
I tried removing duplicates and getting the words but it didn't work!!!
Here is the code:
Code:
$join=join("#",@arr); $join=~/(.*)\#(.*); push(@id,$2); push(@words,$1); #push(@temp,$join); %seen; for ( my $i = 0; $i <= $#id; ) { splice @id, --$i, 1 if $seen{$id[$i++]}++; } for($j=0;$j<scalar(@id);$j++) { print "<br> $words[$j] <br>"; }
Code:
18340633: mouse, sperm ,proteome,strip 18184912: Role, insulator
Regards
Archana
Comment