[Bioperl-l] extracting CDS location from Genbank

Sendu Bala bix at sendu.me.uk
Tue Dec 4 16:22:12 UTC 2007


Captainrave wrote:
> #!/bin/perl
> my $file = shift; # get the file name, somehow
>
> The file is on the same folder.  But how do I tell it to use this file?

http://stein.cshl.org/genome_informatics/perl_intro/command_line.html

Basically, when you run your script add the name of the file to your 
command line.

me% perl myscript.pl myfile

By saying 'my $file = shift' inside myscript.pl, the variable $file now 
contains the filename 'myfile'.

You could also have hardcoded the filename:
my $file = 'myfile';


Anyway, you're going to run into lots of these issues, and they're 
beyond the scope of this mailing list. For basic perl problems seek help 
via www.perl.org. When you have a BioPerl-specific question, don't 
hesitate to post here.



More information about the Bioperl-l mailing list