Perl - Net::FTP - download all PDF files
I'm using Perl's Net::FTP to download some files. At the moment it is downloading only one file. I want to download all PDF files. Can someone please show me how do I do that? Thanks.
Here's my code: Code:
#!/usr/bin/env perl |
Well ... guess you'll want to retrieve a directory listing,
filter out the PDFs and retrieve them in a loop? Cheers, Tink |
That seems what you have to do - see this thread for suggestions:
http://www.perlmonks.org/?node_id=32298 Or, you just try wget with -Apdf |
try
$filename="*.pdf"; i guess that will work |
i agree with tinkster, i did something like that before, what you want to do is get a list of the files you want and then select only the pdf files, after that just use a for loop
enrique |
All times are GMT -5. The time now is 02:31 PM. |