cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl, Perl and error codes

From: Jake Peavy <djstunks_at_gmail.com>
Date: Tue, 19 Aug 2008 12:13:05 -0400

On 8/19/08, Adnane <adnane_at_gmail.com> wrote:
>
> Hey guys,
> This is my first post on this list so please excuse my ignorance.
> I'm writing a perl application to send an xml file to a remote server and
> I'm using curl through system calls: qx (for reasons beyond my control, I
> can't install the Curl::Easy module on this machine).
> When the transfer fails, a message such as: 'curl: (7) socket error: 111'
> is printed on the terminal.
> My question is: is there any way to get that error code (7 in this case)
> inside the perl code and assign it to a variable that I can then act upon
> (maybe send an email)?
> I searched all over the net and couldn't find an answer.
> <http://curl.haxx.se/mail/etiquette.html>

This is not a cURL question, this is a Perl question.

See perldoc perlvar, in particular $CHILD_ERROR

-- 
-jp
Is there anything more beautiful than a beautiful, beautiful flamingo,
flying across in front of a beautiful sunset? And he's carrying a beautiful
rose in his beak, and also he's carrying a very beautiful painting with his
feet. And also, you're drunk.
deepthoughtsbyjackhandy.com

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-08-19