You asked the module to start the default browser and pass it some parameter, that's what it did. It doesn't have any chance to find out what did that program do then. You may check whether the page is accessible using LWP::Simple, but this may fail if the script runs within the intranet of some company that doesn't allow direct access to web servers and requires the use of a HTTP proxy.

If you did need the script to handle this it would have to look into the registry to find out which is the default browser, using some browser specific code find out the proxy and then use LWP::UserAgent and set the proxy parameters the same way they are in the browser. Probably too much work.


In reply to Re: Get error code using ShellExecute to open browser by Jenda
in thread Get error code using ShellExecute to open browser by athanasia

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.