in reply to Unable to execute URL from perl/cgi script
When I replace the URL in each of the code examples, they both run for me. If the code is executing on your side too, then the problem may be on the network or on the server side. It would be good if you could elaborate on "failing to do".... what error messages are you getting? Can you access these URLs from the command line? Please see How do I post a question effectively? and Basic debugging checklist.
Or, perhaps the code isn't doing what you want it to? The first code example does seem a little strange: You load LWP::Simple, but then call the external wget command. If you wrote my $data = get($url);, you could fetch the URL into Perl without going to the external command. If you could explain the bigger picture of what you are trying to do that would be good.
BTW, since you're using LWP::Simple and CGI together, please see the section "Caveat" at the bottom of LWP::Simple.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unable to execute URL from perl/cgi script
by coolsaurabh (Acolyte) on Feb 06, 2015 at 06:28 UTC | |
by Anonymous Monk on Feb 06, 2015 at 21:40 UTC |