I have this script below and I keep getting the following errors which I
assume is because of the ftp->put statement.  Any help is appeciated.

errors:
Syswrite on closed filehandle at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread/Net/Cmd.pm line
173, <STDIN> chunk 2.
/home/cruble/test2/bCatalogLoad.sql
get{sock, peer}name() on closed fd at
/usr/local/lib/perl5/5.00502/sun4-solaris-thread/IO/Socket.pm line 186,
<STDIN> chunk 2.
Syswrite on closed filehandle at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread/Net/Cmd.pm line
173, <STDIN> chunk 2.
Syswrite on closed filehandle at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread/Net/Cmd.pm line
173, <STDIN> chunk 2.

$label="";
$env="";
$dir="/opt/apps/webmethods/3.5.1/replicate/inbound/";
$intest="/home/cruble/test2"; #location of temporary inbound directory
$vob="/cexpscm/eway";

while () {
        print 'Enter the label you would like to move: ';
        chomp ($label = <STDIN>);
        print 'Enter the environment you would like to promote to (test,
stage or prod): ';
        chomp ($env = <STDIN>);
        if ($label ne '') {
        if ($env eq "test")
        {
                system "rm -f $intest/*";
                system "cleartool find $vob -version \"lbtype($label)\"
-exec \'cp \$CLEARCASE_PN $intest\'";
                system "chmod 777 $intest/*";
                opendir (DIRN, $intest);
                @filelist=readdir DIRN;
                closedir DIRN;
                use Net::FTP;
                $ftp = Net::FTP->new("servername");
                $ftp->login("login","password");
                $ftp->cwd($dir);
                foreach $filen (@filelist) {
                        if (!-d "$intest/".$filen) {
                                print "$intest/$filen\n";
                                $ftp->put("$intest/$filen");
                        }
> Charlie Ruble
> SCM Administrator
        Corporate Express - A Buhrmann Company
> wk.(303) 664-3367
> 
> 
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to