[sf-perl] Escalation or something else?

Michael Friedman friedman at highwire.stanford.edu
Mon May 12 11:01:22 PDT 2008

curl is a great command-line program for grabbing files from a URL.  
But if you're going to write a Perl script, why not use LibWWWPerl  
(LWP::*) instead? That gets you a lot more error handling and features.

See the perldoc for LWP::UserAgent, HTTP::Request, and HTTP::Response.  
UA has a good example to use.

Also, from the command-line, you can use GET, an LWP script installed  
by perl. My copy is in /usr/bin/GET, but yours may be elsewhere. You  
could even use GET as a model, but it's pretty sophisticated so it's  
probably more than you need if you're considering system("curl..").

On top of that, there are many CPAN modules for doing HTTP stuff from  
perl. Try out a couple! TIMTOWTDI.

-- Mike

On May 11, 2008, at 8:31 PM, Neil Heller wrote:

> Has anybody used curl?
> If so, what did you use it for?
> Did you use it from the command line or from a Perl script?
> Neil Heller
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm

Michael Friedman                     HighWire Press
Phone: 650-725-1974                  Stanford University
FAX:   270-721-8034                  <friedman at highwire.stanford.edu>

More information about the SanFrancisco-pm mailing list