Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Parsing Sequence Records

by thezip (Vicar)
on May 07, 2014 at 20:09 UTC ( #1085374=note: print w/replies, xml ) Need Help??

in reply to Parsing Sequence Records

You might also consider using the three argument form of open:

open(my $in, '<', "/Users/Desktop/Pipelines/fungi.1.aa.hypothetical.fa +a"); open(my $out, '>', "Users/Desktop/Pipelines/fungi.1.aa.hypothetical50. +faa");

*My* tenacity goes to eleven...

Replies are listed 'Best First'.
Re^2: Parsing Sequence Records
by Laurent_R (Canon) on May 07, 2014 at 21:56 UTC
    I definitely agree with the three-argument syntax you are suggesting, but I think that MidLifeXis's comment was even more important: checking whether the file could be open. I would therefore suggest this possible syntax:
    my $input_file = "/Users/Desktop/Pipelines/fungi.1.aa.hypothetical.faa +"); my $output_file = "Users/Desktop/Pipelines/fungi.1.aa.hypothetical50.f +aa"); open my $in, '<', $input_file or die "could not open $input_file $!"; open my $out, '>', $output_file or die "could not open $output_file $! +";

      I always use autodie, so its a moot point for me... :-)

      *My* tenacity goes to eleven...
Re^2: Parsing Sequence Records
by lomSpace (Scribe) on May 09, 2014 at 12:33 UTC

    thezip: That was simple enough. One of my Duhh moments. Thanks!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2022-10-06 10:20 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (26 votes). Check out past polls.