Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The next step is to be able to exclude certain files that meet a regex pattern from being downloaded. According to the documentation this can be accomplished by including the parameter OmitAll into the rget() method. The documentation states that I give OmitAll a regex object. So let say we want to filter out files that contain a string "S1499" I implemented the following changes to the code(below) to no avail, can anyone point out perhaps what I am missing?#!/usr/bin/perl -w use strict; use Net::FTP::Recursive; my $ftp = Net::FTP::Recursive->new("ftp.domain.name", Debug => 1); $ftp->login("anonymous",'scientist@site'); $ftp->cwd('/pub/files/'); $ftp->rget(); $ftp->quit;
Any help and or insight is greatly appreciated!use strict; use Net::FTP::Recursive; my $ignore=qr/S1499/; my $ftp = Net::FTP::Recursive->new("ftp.domain.name", Debug => 1); $ftp->login("anonymous",'scientist@site'); $ftp->cwd('/pub/files/'); $ftp->rget([OmitAll => "$ignore"]); $ftp->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need Help With Net::FTP::Recursive
by eric256 (Parson) on May 06, 2004 at 17:54 UTC | |
|
Re: Need Help With Net::FTP::Recursive
by sacked (Hermit) on May 07, 2004 at 00:16 UTC | |
|
Re: Need Help With Net::FTP::Recursive
by Anonymous Monk on May 06, 2004 at 18:10 UTC | |
by eric256 (Parson) on May 06, 2004 at 21:12 UTC |