Bob Showalter wrote:

> Johnson, Shaunn wrote:
> > Howdy:
> >
> > I'm looking for information that will let me
> > open an ftp connection and grep / search
> > for files and then FTP them back to me.
>
> What do you mean "grep/search" for files? If you want to search for
> particular file *names*, Net::FTP can return a list of files and directories
> you can examine.

True, but it is an inadequately documented feature of the module.  The pod
indicates only an optional DIR parameter for the ls function:

    ls ( [ DIR ] )
        Get a directory listing of "DIR", or the current directory.

        In an array context, returns a list of lines returned from the
        server. In a scalar context, returns a reference to a list.

But the following:

my @files = $ftp->ls("*.jpg");
print "$_\n" foreach @files;

does render:

Clouds.jpg
DarkSky.jpg
Davis Logo.jpg
DavisLogo.jpg

Joseph



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to