Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: pattern matching to seperate data

by snopal (Pilgrim)
on May 03, 2009 at 13:43 UTC ( #761580=note: print w/replies, xml ) Need Help??


in reply to pattern matching to separate data

This looks like homework to me so I'll make suggestions rather than code

1) Filehandles can be stored in variables too:

my ($fh1, $fh2); open $fh1, ">GENEID.out" or ... open $fh2, ">PROTID.out" or ...

2) Read every line - print every line. You are obviously not doing that.

3) set another Filehandle var '$fh' with the appropriate Filehandle as you detect a change and use your new $fh to store and print to the right file.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2020-10-30 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (280 votes). Check out past polls.

    Notices?