I am new to Perl Scripting and have a problem with this script. I have a script that I run to generate a log file which contains the Month/Day within the filename and also the hostname of about 300 Unix Servers that the script is ran on. I am trying to use Net::Ftp in a script to pull this file back to another unix box in order to generate a report that includes all the files into 1 file. Here is the script that I am using and each time I run it it returns an error stating that it is unable to get the file.
Any help would be greatly appreciated
I am using AIS 4.2.1.0 on an F50
An example of the filename is tpcl0507@bst00223.
#!/usr/local/bin/perl -w
use Net::FTP;
$store = shift;
$user = "root";
@password = ("xxxxxxxx"
$date = `date +%m%d`;
$file = "tpcl$date"."\@$store";
$| = 1;
$ftp = Net::FTP->new($store);
$ftp->login($user, @password)
or die "Unable to connect to store \"$store\"";
$ftp->cwd("/tmp"
or die "Unable to change to the /tmp directory";
$ftp->binary();
$ftp->get("$file"
or die "Unable to get $file";
$ftp->quit();
Any help would be greatly appreciated
I am using AIS 4.2.1.0 on an F50
An example of the filename is tpcl0507@bst00223.
#!/usr/local/bin/perl -w
use Net::FTP;
$store = shift;
$user = "root";
@password = ("xxxxxxxx"
$date = `date +%m%d`;
$file = "tpcl$date"."\@$store";
$| = 1;
$ftp = Net::FTP->new($store);
$ftp->login($user, @password)
or die "Unable to connect to store \"$store\"";
$ftp->cwd("/tmp"
or die "Unable to change to the /tmp directory";
$ftp->binary();
$ftp->get("$file"
or die "Unable to get $file";
$ftp->quit();