This only addresses the second error. I already addressed the first error in an earlier post.
The second error means that http://pseweb.vmware.com/pending/194951021 returned status code 500, getstore is unable to fetch that resource, or some internal error occured in getstore. getstore doesn't provide much feedback, unfortunately. You could use LWP::UserAgent's request method instead of LWP::Simple's getstore and dump the response on error, but I suspect it's one of the following:
- The currect directory isn't what you think it is. It's probably /. Use absolute paths or chdir to the desired directory.
- LWP is unable to create the file because the user as which your script runs cannot write to the current directory. Adjust file permissions accordingly.
- CGI script can't do HTTP requests on your server. Adjust your server's security settings and/or the settings of the proxy/firewall/router protecting in front of your server.
The first two problems can also be avoided by not using a file at all. If you don't actually need to store the file, just use get.
use LWP::Simple qw( get );
my $data = get($url);
open(IN, '<', \$data);
while (<IN>) {
...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.