I'm trying to come up with a script that will read a list of files from a
text file and copy them from one path to another. I can't seem to get perl
to use the text file as <STDIN> on a Win2000 PC. I call the perl program
from the command line using the < to direct the data file to <STDIN> (i.e.
cp.pl < inputfile.txt). When I don't use the inputfile I can enter <STDIN>
from the keyboard and it works. Also, I can get it to read the file on a
UNIX box. Here's a short sample of the code I'm trying.
TIA
Scott Gibson
[EMAIL PROTECTED]
****************************************************************************
**
$DEVSERVER = 'g:\\';
$POSTSERVER = 'h:\\';
while (defined($_ = <STDIN>)) {
print "This is the path\n" ;
print $_ ;
print "\n";
#####Do a directory listing on both paths to verify the;
#####modified date on the file.;
system ("dir $DEVSERVER$_");
system ("dir $POSTSERVER$_");
#####Copy the file from one path to the other;
system ("copy $DEVSERVER$_ $POSTSERVER$_");
#####Do a directory listing on both paths to verify the;
#####modified date on the file changed on the scond path.;
system ("dir $DEVSERVER$_");
system ("dir $POSTSERVER$_");
}
****************************************************************************
***
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]