in reply to Curl usage with Perl's system command

The correct call to system would be:

system ($command, @args);

However, I don't see any advantage to forking out to curl when you could be using LWP or similar. Do you have a particular reason for that?

Replies are listed 'Best First'.
Re^2: Curl usage with Perl's system command
by perlron (Pilgrim) on Oct 28, 2014 at 15:00 UTC
    no i tried that it with brackets it doesnt seem to work.
    Its definitely a curl command quirk that im missing as using system with shell commands like ls work fine with and without args.
    Ok LWP , i hadnt thought yet of using. The curl API was available on the server so it was a quick copy paste and use for me.
    are you recommending i try LWP as an alternative to using curl ? and just use the same URLS and strings the mail company is giving me ??
    im not an expert in perl, but that i think would be interesting.
    on a lighter note.i can even post it to that mail company and tell them to support perl!
    Do not wait to strike when the iron is hot! Make it hot by striking - WB Yeats
      are you recommending i try LWP as an alternative to using curl ?

      Absolutely! LWP (or a similar module) keeps everything within perl. This means that there's no comparable overhead (no shell or sub-process to be created) and that the response can be examined easily and in detail instead of just getting the integer return code from system(). It also gives you a cookie jar, control over SSL options (where applicable) and all manner of other goodies. Definitely give it a try.

        LWP it is then.im all for keeping it in perl.
        i mean that company does not support perl. from the information u guys are confirming it doesnt matter.
        so i really hope LWP or WWW::Curl will work for me.
        Do not wait to strike when the iron is hot! Make it hot by striking - WB Yeats