[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] FTP Dir to URL (fwd)



Well, I just had to respond.  ;-)

How about combining the recursive find program presented
earlier with Paul's libnet routines he's converted?  Like
this:

#!/perl
	use File::Find;
	use Net::FTP;


    $ftp = Net::FTP->new( "some.host.name" );
    $ftp->login( "anonymous","me@here.there" );
    $ftp->cwd( "/yourDirectory" );

	&find( \&print_puds, "theDirectory:" );
    $ftp->quit;
	exit( 0 );

sub print_puds
{
   print "$File::Find::name\n" if $_ =~ /\.pud$/;
    $ftp->put( "that.file" );
}