agustina_s has asked for the wisdom of the Perl Monks concerning the following question:
In this case what if I want to map ${$_}[1] and ${$_}[2] both at the same time?? I try usingprint OUT join "\n", map {${$_}[1]}grep { ${$_}[0] eq "EMBL" } $entry- +>DRs->elements;
But either comma or colon, they still give me some error. And what if I want to map all the elements in the array?? I have tried without the map function such asprint OUT join "\n", map {${$_}[1],${$_}[2]}grep { ${$_}[0] eq "EMBL" +} $entry->DRs->elements;
But it doesn't print the content of the array but only the address : ARRAY(...). Thank you in advanced.print OUT join "\n",grep { ${$_}[0] eq "EMBL" } $entry->DRs->elements;
Edit Masem 2002-01-17 - Added code tags, changed title from "about grep..."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: about grep....
by Zaxo (Archbishop) on Jan 17, 2002 at 15:17 UTC | |
|
Re: about grep....
by djantzen (Priest) on Jan 17, 2002 at 15:44 UTC | |
by demerphq (Chancellor) on Jan 17, 2002 at 16:44 UTC |