
February 18th, 2013, 04:31 PM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 1
Time spent in forums: 11 m 47 sec
Reputation Power: 0
|
|
Problem with Getoptions (please help)
I have the script below. But when I insert the variables url and nameorg to execute it, I received the following error message: Scheme missing.
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use Getopt::Long;
my $url= '';
print "&&&&$url&&&&"."\n";
my $nameorg= '';
#my $nameorg= "Staphylococcus_aureus_04_02981_uid161969"; #organismo que buscamos
print "%%%%$nameorg%%%%"."\n";
#LA OPCION DE GetOptions funciona, pero sale un error que es
if(!$url){
warn "no ha puesto url\n";
&usage();
}
elsif (!$nameorg) {
warn "no ha puesto el nombre del organismo";
&usage();
}
sub usage {
print 'tutorial script';
}
GetOptions('url' => \$url, 'nameorg' => \$nameorg);
###############################################
my $cmd_wget="wget $url".$nameorg."/*.fna\n";
system($cmd_wget);
#################################################
I don't know what to do. Can somebody help me?
|