Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^5: Print entire line

by Loops (Curate)
on Nov 06, 2014 at 14:32 UTC ( #1106379=note: print w/replies, xml ) Need Help??


in reply to Re^4: Print entire line
in thread Print entire line

It's essentially the same program, with a different comparison:

my $filename = '/Users/Pabli/Desktop/do_human_mapping.gmt'; my $match = 'IL4'; open(my $file, '<', $filename) or die "open: $!"; while (<$file>){ my ($name,$id,@genes) = split /\t/; print $id,$/ if grep/^$match$/, @genes; }

Happy to help, but the hope is that you're working towards being able to construct these lil programs for yourself!

Replies are listed 'Best First'.
Re^6: Print entire line
by pabla23 (Novice) on Nov 06, 2014 at 15:15 UTC
    Thanks a lot "Loops" you are amazing!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1106379]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-05-22 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (78 votes). Check out past polls.

    Notices?