Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: BBC4 Radio Schedules and LWP:UserAgent problem

by Anonymous Monk
on Apr 07, 2018 at 21:16 UTC ( [id://1212502]=note: print w/replies, xml ) Need Help??


in reply to Re^3: BBC4 Radio Schedules and LWP:UserAgent problem
in thread BBC4 Radio Schedules and LWP:UserAgent problem

Thank you for that.
I have been looking more at the example which failed because LWP::Protocol::https module is required.
This failure message is only given when the final line of trying to print $html is included in the Perl.
$html is set equal to $res->content. Printing the variable $res I get the text HTTP::Response=HASH(0x54d8608)

As I only want to read the contents of the original web page, can I simply read the 'content' and therefore store the data in a hash? If so how is this done?

If this can be done if may mean I do not have to find out how to install the missing modules and their dependencies.
  • Comment on Re^4: BBC4 Radio Schedules and LWP:UserAgent problem

Replies are listed 'Best First'.
Re^5: BBC4 Radio Schedules and LWP:UserAgent problem
by poj (Abbot) on Apr 08, 2018 at 08:21 UTC

    Run this script and post the output to show which OS, perl and module versions you have

    #!/usr/bin/perl use strict; use warnings; print grep /buil/i,qx(perl -v); print grep /buil|osname|uname|compile/i,qx(perl -V); printf "OS = %s\nPerl = %s\n\n",$^O,$^V; my @modules = qw(LWP::UserAgent LWP::Protocol::https Mozilla::CA); for my $mod (@modules){ if ( eval "use $mod;1" ) { no strict 'refs'; printf "%-20s = %s\n",$mod,${$mod.'::VERSION'}; } else { print "ERROR $@"; } } print join "\n",'','@INC = ',@INC;
    update 1 using eval update 2 added Mozilla:CA
    poj

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1212502]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-25 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found