Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Presentation: Intro to Perl and LWP

by hossman (Prior)
on Mar 02, 2005 at 00:10 UTC ( #435663=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    Perl & LWP
    HTTP Connections In Perl
  2. or download this
    What is HTTP?
    Expires: Fri, 04 Feb 2005 00:43:02 GMT
  3. or download this
    LWP is easy to use
    } else {
        print $response->status_line, " <URL:$url>\n";
  4. or download this
    LWP::Simple is even easier
    use LWP::Simple;
  5. or download this
    First, a Perl refresher
    if ($bar->[1]) {                 # "if" and "print" work the way you t
      print "$first is true\n";      # Double quotes evaluate variables
    }                                #   ... prints: Hoss is true
  6. or download this
    More fun with LWP::Simple
    my ($type, $length, $mod, $exp, $server) = head('');
    print "Content Type is $type, and the Server is $server\n";
  7. or download this
    LWP::UserAgent is more "full featured"
                              {'descr'     => 'your bug description',
                               'component' => 'your bug component',
                               'priority'  => 'P1' });
  8. or download this
    HTTP::Request & HTTP::Response
    while ($res = $res->previous()) {
        print "Redirected from: ", $res->request()->uri(), "\n";
  9. or download this
    Previous script's output
    The URL was:
    Redirected from:
    Redirected from:
  10. or download this
    Other cool features worth looking at
     * Read/write cookies from disk (in Mozilla or Microsoft formats)
     * Parse/Submit forms auto-magically
     * LWP:RobotUA, LWP::Parallel::UserAgent, LWP::UserAgent::FramesReady
  11. or download this
    One caveat to LWP::Simple
    my $data = get('');
  12. or download this
    More Info

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://435663]
Approved by davidj
Front-paged by ybiC
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2015-11-25 19:52 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (688 votes), past polls