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.
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>
| [reply] [d/l] [select] |