perl - How can I use Net::FTP to get a file matching a pattern? -


how can use net::ftp file matching pattern?

basically want is:

$ftp->get("test*"); 

should match files starting test , get().

thanks help!

try this solution perlmonks.org. remote ls, filter out don't want grep, fetch files.

$ftp->get($_) grep /\.txt$/, $ftp->ls; 

btw, took 10 seconds find google "net::ftp mget"


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -