Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Input record separator

by monkey_boy (Priest)
on Mar 18, 2005 at 09:57 UTC ( [id://440652]=note: print w/replies, xml ) Need Help??


in reply to Input record separator


Why not just do it the simple way, as chomp will remove the '>' (if $INPUT_RECORD_SEPARATOR = '>'), then skip empty records & re-add the '>',
somthing like:
use English; local $INPUT_RECORD_SEPARATOR = '>'; while (my $buf = <$fh>) { # remove '>' & skip empty records: chomp($buf); next if ($buf =~ m/^\s*?$/); my $fasta = ">$buf\n"; };

*UPDATE*: added use English;


This is not a Signature...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-20 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found