Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can anyone see something wrong with this that I'm not seeing? Any help much appreciated. Thank you.#!/usr/bin/perl $pdblist = $ARGV[0]; $ftp = "/usr/bin/ftp"; $ftptmp1="filename1.txt"; $ftphost1 = "ftp.rcsb.org"; $ftpdir1 = "pub/pdb/data/structures/all/pdb/"; $pdb = "pdb"; $ent = ".ent"; open(PDBLIST, "$pdblist") || die "ERROR: Unable to open $pdblist FILE: + $!\n"; print "$pdblist\n" while(<PDBLIST>) { @fields = split; $pdbname = $fields[0]; $pdbname =~ tr/[A-Z]/[a-z]/; $pdbfile = "$pdb$pdbname$ent"; # get pdb file from ftp site print "Retrieving $pdbfile file from FTP site ...\n"; open(FTP, "|$ftp -n $ftphost1 > $ftptmp1"); print FTP "user anonymous "; print FTP "password a.l.cuff\@qmul.ac.uk\n"; print FTP "cd $ftpdir1\n"; print FTP "bin\n"; print FTP "get $pdbfile\n"; print FTP "bye"; $pdbfileunzipped = substr($pdbfile, 0, 11); print "Decompressing $pdbfileunzipped ... \n"; system("gunzip $pdbfile"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ftp script problem .. bad interpreter?
by PodMaster (Abbot) on Apr 18, 2005 at 09:32 UTC | |
by jhourcle (Prior) on Apr 18, 2005 at 10:51 UTC | |
|
Re: ftp script problem .. bad interpreter?
by davidj (Priest) on Apr 18, 2005 at 09:31 UTC | |
by Anonymous Monk on Apr 18, 2005 at 09:46 UTC | |
|
Re: ftp script problem .. bad interpreter?
by inman (Curate) on Apr 18, 2005 at 10:54 UTC |