in reply to How to control input of an external program?

The curl library can be accessed from Perl more directly via WWW::Curl, WWW::Curl::Simple and LWP::Curl. You should check if any of those fulfill your needs.

There's also LWP available to you, the standard Perl web module.

  • Comment on Re: How to control input of an external program?

Replies are listed 'Best First'.
Re^2: How to control input of an external program?
by klactose (Initiate) on Nov 09, 2009 at 19:52 UTC
    Thanks, I will look into the Curl modules, didn't realize that Perl had any. I did look into LWP but I couldn't find info about support for the full range of HTTP methods, only for POST/GET. Perhaps I didn't look long enough!

      I don't know what you made you think that some methods aren't accepted, but testing shows DELETE is accepted

      $ perl -MHTTP::Request -e' print HTTP::Request->new( DELETE => "http://..." )->as_string ' DELETE http://...
        Hmmm... interesting. I couldn't locate any documentation about it supporting all the methods. Good to know that it does. I think another reason I stopped looking was because I got the notion that I would have had to manually authenticate using Base64, and it started getting more complex than the one line of code I originally wanted to write.

        This little piece of code is really just to create and delete some users from a webservice I created, so I can run some junit tests with a populated server.

        It's amazing how sometimes the sideshow is more research than the main event! =)

        Thanks again for your insight. I am obviously only a novice Perl programmer. I definitely appreciate all of the advice/help I've received today.