-4

can v download media contents and save it in a destination folder without using LWP module??

Ben
  • 1
  • 3
  • What were your efforts? – Krishnachandra Sharma Mar 04 '13 at 09:47
  • 1
    Yes you can, why would you want to? – MkV Mar 04 '13 at 09:59
  • ive been trying a lot.. got a few codes but its related to cgi.. so was eager to know if i can make it simple somehow as dont know anything about cgi – Ben Mar 04 '13 at 10:00
  • i want to automate downloading certain files for my project..@MkV – Ben Mar 04 '13 at 10:01
  • can anyone tell me how to copy codes into comment?? it isnt accepting even after deleting characters to compress to the accepted length – Ben Mar 04 '13 at 10:04
  • not working!! @user1126070 – Ben Mar 04 '13 at 10:43
  • You have given very little information. Please at least say what operating system you are using and explain why you want to avoid `LWP`. Are `HTTP::Client or `HTTP::Lite` acceptable alternatives? – Borodin Mar 04 '13 at 10:54
  • sorry for the inconvenience.. im new to perl and yes http::lite is something ive worked with.. i do want to paste the code here but i dont know y its not getting accepted!!! – Ben Mar 04 '13 at 11:04
  • You should edit your question and paste your code there. – Borodin Mar 04 '13 at 11:38

3 Answers3

2

In Perl, there are many ways of doing that. Neil Bowers made an excellent survey CPAN modules for making HTTP requests; use it as a reference for your needs. In a nutshell:

HTTP flowchart
(source: neilb.org)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
creaktive
  • 5,193
  • 2
  • 18
  • 32
1

You could use commandline tools in linux to do this.

Check curl and wget documentation.

On windows you could install cygwin and use linux tools.

Regards,

user1126070
  • 5,059
  • 1
  • 16
  • 15
1

Without knowing why you want to avoid LWP it is hard to help.

Coding an HTTP client is far from simple and a module of some sort or an external utility is pretty much essential.

I suggest HTTP::Client, HTTP::Lite or HTTP::Tiny, which are all stand-alone HTTP client modules that don't depend on LWP.

Borodin
  • 126,100
  • 9
  • 70
  • 144