Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi there.
I'm a newbie to perl and currently trying to convert an existing shell-script I made to perl. I'm having problems converting the ftp part. The shell-script version is this: YDAY=`TZ=TAIST+16 date '+%Y%m%d'` /usr/bin/ftp -n 192.168.180.27 << EOF user nped nped bin lcd /tmp/npdd/output prompt mget GOLD_SCH$YDAY.Z close EOF I tried the Net::FTP::Recursive module but I'm having trouble with the rget command to use wildcards as above. Here's what I tried doing (but failed, of course): use Net::FTP::Recursive; $ftp = Net::FTP::Recursive->new("192.168.118.58", Debug => 0); $ftp->login("rbi",'rbi'); $ftp->cwd("/data/rbi/RBIPublic/combination/bak"); $ftp->rget( ParseSub => \&yoursub ); # $ftp->rget("evcREC$YDAY.*,/c0re/goldsch/input"); $ftp->quit; In reply to Net::FTP::Recursive rget by daytripper1021
|
|