|
Prev: use of DBI; I am getting multiple error messages mixed in with ?the correct output.
Next: Trying to get a simple SOAP server to work
From: Joost Diepenmaat on 24 Apr 2008 12:09 Winston75 <baptiste.fevre(a)gmail.com> writes: > Ok : > > getstore ($url, $filename); > print $!; > > Result --> bade file descriptor !! The value of $! doesn't mean anything unless you know that the last IO operation that occorred resulted in an error. You don't know that here. Looking at the docs for LWP::Simple, seems you need something like this: my $rc = getstore($url,$filename); if (is_error($rc)) { die "Some error occurred: $rc"; } -- Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
From: Peter Makholm on 24 Apr 2008 12:09 Winston75 <baptiste.fevre(a)gmail.com> writes: > getstore ($url, $filename); > print $!; Only assume that $! is relevant if the documentation says so, and even when the documentation says that it is relevant it is almost always if the called function signals an error in some way. //Makholm
From: Winston75 on 24 Apr 2008 12:24 On 24 avr, 18:09, Peter Makholm <pe...(a)makholm.net> wrote: > Winston75 <baptiste.fe...(a)gmail.com> writes: > > getstore ($url, $filename); > > print $!; > > Only assume that $! is relevant if the documentation says so, and even > when the documentation says that it is relevant it is almost always if > the called function signals an error in some way. > > //Makholm Ok thanks, my results : downloading file1.zip....Failed with response code 404 downloading file2.zip....Failed with response code 404 downloading file3.zip....Failed with response code 404
From: RedGrittyBrick on 24 Apr 2008 13:30 Winston75 wrote: > On 24 avr, 18:09, Peter Makholm <pe...(a)makholm.net> wrote: >> Winston75 <baptiste.fe...(a)gmail.com> writes: >>> getstore ($url, $filename); >>> print $!; >> Only assume that $! is relevant if the documentation says so, and even >> when the documentation says that it is relevant it is almost always if >> the called function signals an error in some way. >> >> //Makholm > > > Ok thanks, my results : > > downloading file1.zip....Failed with response code 404 > downloading file2.zip....Failed with response code 404 > downloading file3.zip....Failed with response code 404 404 means the URL is incorrect - there's no page with that path. I'd change the print statement from print "downloading $fileName...."; to print "downloading $fileName from '$url' ...."; I expect that will identify the problem. -- RGB
From: Chris Mattern on 24 Apr 2008 16:26
On 2008-04-24, Winston75 <baptiste.fevre(a)gmail.com> wrote: > On 24 avr, 18:09, Peter Makholm <pe...(a)makholm.net> wrote: >> Winston75 <baptiste.fe...(a)gmail.com> writes: >> > getstore ($url, $filename); >> > print $!; >> >> Only assume that $! is relevant if the documentation says so, and even >> when the documentation says that it is relevant it is almost always if >> the called function signals an error in some way. >> >> //Makholm > > > Ok thanks, my results : > > downloading file1.zip....Failed with response code 404 > downloading file2.zip....Failed with response code 404 > downloading file3.zip....Failed with response code 404 "Quoth the server, 404. That file, it don't exist no more." -- Christopher Mattern NOTICE Thank you for noticing this new notice Your noticing it has been noted And will be reported to the authorities |