jrock has asked for the wisdom of the Perl Monks concerning the following question:
sub ftp_data { if (!($ftp = Net::FTP->new("$hostname"))){ printf "error connecting to $hostname\n"; system("echo \"could not connect to host \n$!\n\" | $B +IN/mailx -s\"$SCRIPT\" $prob"); exit; } if (!($ftp->login("$username","$password"))){ printf "error login \n"; $ftp->quit; system("echo \"could not log in: \n$!\n\" | $BIN/mailx + -s\"$SCR IPT\" $prob"); exit; } if (!($ftp->put("$OUTFILE2/IC$CPREVDATE"))){ printf OUTPUT "FAILED $line_counter,FAILED\n"; printf "error transferring file. \n"; system("echo \"could not transfer (PUT) $IN file \n$!\ +n\" | $BI N/mailx -s\"$SCRIPT\" $prob"); exit; } if (!($ftp->quit)){ printf "error while quitting \n"; system("echo \"could not quit ftp\n$!\n\" | $BIN/mailx + -s\"$SCR IPT\" $prob"); } } # End ftp_data
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: FTP issue - feedback appreciated
by Beatnik (Parson) on May 23, 2001 at 21:03 UTC | |
|
Re: FTP issue - feedback appreciated
by blue_cowdawg (Monsignor) on May 23, 2001 at 21:28 UTC | |
|
Re: FTP issue - feedback appreciated
by monk2b (Pilgrim) on May 23, 2001 at 22:21 UTC | |
|
Re: FTP issue - feedback appreciated
by kschwab (Vicar) on May 24, 2001 at 05:02 UTC | |
|
Re: FTP issue - feedback appreciated
by LordAvatar (Acolyte) on May 24, 2001 at 01:17 UTC |