If you are indeed using a plain shell call over Net::FTP (as suggested above) you might as well use mput which allows filemasks... something like mput *.txt is ofcourse possible. Net::FTP doesn't appear to have mput (and mget), but you can loop a put statement :
foreach $file (@files) { $ftp->put($file); }
Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.
Do you get my reply to the other responses?
I don't have the Net::ftp module; only you
provided a non Net::ftp solution. I tried
this and I get the following message:
#!/usr/bin/perl
@files = ($file1,$file2,$file3);
print "Enter $rem_host login name\n";
$rem_user = <STDIN>; chop $rem_user;
print "Enter password\n";
$rem_passwd = <STDIN>; chop $rem_passwd;
$rem_host = machinename;
$log = "log \n";
$command =<<eod;
foreach $file (@files) {
ftp->mput($file); } # ?? (where do i put this)
ftp $rem_host << eof > $log;
user $rem_user
password $rem_passwd
bye
eof
eod
error:
Can't call method "mput" on an undefined
value at ./eod.pl...
I also tried "put" - same error. Can you
clarify what you mean about mput*.txt?
Obviously, I'm not sure what you mean.
Thanks!