Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Spltting Genbank File

by starX (Chaplain)
on May 29, 2009 at 00:33 UTC ( [id://766782]=note: print w/replies, xml ) Need Help??


in reply to Spltting Genbank File

I and others would be very interested in seeing some of these errors, I'm sure, but right off the top of my head, you might try the following changes:

my $genfile = 'c:\bemisia_coi.gb';

and

 my @line = split(/\/\//,$line); # If you want to split on //

and

my $sequence = "/origin(\*+)\/\/\"; # as above

Good on you for using strict and warnings, though. The specific errors that you're getting will do wonders for helping us understand what specific problems you have.

Replies are listed 'Best First'.
Re^2: Spltting Genbank File
by rovf (Priest) on May 29, 2009 at 10:44 UTC
    my $genfile = 'c:\bemisia_coi.gb';

    I know that your specification is technically correct, but since the OP is new to Perl and programming, I think it would be better to escape the backslash, though it's not strictly necessary here:

    my $genfile = 'c:\\bemisia_coi.gb';
    Getting the habit of escaping backslashes inside single quotes every time, prevents from surprises when we one day have to write strings which are supposed to contain two backslashes in a row (such as UNC pathes on Windows):
    # Access UNC path \\myserver\c$\Data $genfile = '\\myserver\c$\Data\x.gb'; # wrong $genfile = '\\\myserver\c$\Data\x.gb'; # correct, but doesn't look nic +e $genfile = '\\\\myserver\\c$\\Data\\x.gb'; # correct, and looks consis +tent

    -- 
    Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-19 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found