Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Thanks, LWP worked brilliantly.

Just as an aside for anyone looking at this thread in the future, I am behind a firewall and so had to add the following code to make it all work.

use LWP::Simple qw(&getstore &is_success $ua);

The above imports the $ua variable and the subs I needed, $ua (User Agent, see LWP::UserAgent) is used to set proxy settings.

# Initialise the proxy $ua->proxy(http => 'http://wwwcache.ex.ac.uk:8080'); #$ua->proxy_authorization_basic( 'username', 'password' );

The above actually sets the proxy. I didn't need any proxy auth, but you might, hence the line is there but commented out. Once this is done the subs like getstore worked great.

Hope this helps in the future.

Best wishes and thanks again, Arun


In reply to Incase You Need to Use a Proxy with LWP by arunhorne
in thread Retrieving Data from URL by arunhorne

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-25 14:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found