in reply to Wget using backquotes

Looks like wget is putting the response code into STDERR. I did this

$response = `wget --spider -nv $url 2>&1`;
And got the code into $response.

As for the varying return codes, it probably means that the server you're hitting is not able to respond properly everytime. Maybe it's overloaded, or purposely throttling you. Could be many things.

non-Perl: Andy Ford

Replies are listed 'Best First'.
Re^2: Wget using backquotes
by Anonymous Monk on Jan 03, 2013 at 22:14 UTC
    Thank you! the 2>&1 did the trick for me!