in reply to pattern matching with wildcards...
Net::FTP::Simple can do
which is even easier and uses the full power or perl-regexen.my @received_filtered_files = Net::FTP::Simple->retrieve_files({ username => $username, password => $password, server => $server, remote_dir => 'path/to/dir', debug_ftp => 1, file_filter => qr/^ba.\.txt/, delete_after => 0, });
Update: added the example from the Net::FTP::Simple-documentation.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: pattern matching with wildcards...
by mikerzz (Acolyte) on May 12, 2009 at 16:53 UTC | |
by CountZero (Bishop) on May 12, 2009 at 17:49 UTC | |
by mikerzz (Acolyte) on May 12, 2009 at 17:54 UTC | |
by CountZero (Bishop) on May 12, 2009 at 18:37 UTC | |
by mikerzz (Acolyte) on May 12, 2009 at 18:56 UTC | |
|