curl-users
Re: Curl, Perl and error codes
Date: Wed, 20 Aug 2008 22:04:16 +0200
Am Mittwoch, den 20.08.2008, 14:15 -0400 schrieb Jake Peavy:
> $info = qx{/usr/bin/curl -b cookies -c cookies -d "user=xxx&password=xxx&switch=Log+In" https://URL/FOLDER/SUBFOLDER/};
> $info2 = qx{/usr/bin/curl -b cookies -c cookies -F File=\@$file https://URL/FOLDER/SUBFOLDER/};
Has $file a whitespace included (space, tab, ...)? If yes, you need to use double quotes around the filename, as you did with the above -d "user..."
Otherwise curl treats everything after a whitespace as a part of an URL.
If you do not have whitespace in your filename, have you thought about using backticks?
$info2 = `/usr/bin/curl -b cookies -c cookies -F File=\@$file https://URL/FOLDER/SUBFOLDER/`;
Hope this helps - otherwise you should ask this in a perl newsgroup.
Harald
-------------------------------------------------------------------
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-20