Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

LWP::Simple on Windows 2003 IIS

by jonnyfolk (Vicar)
on Feb 13, 2010 at 06:26 UTC ( #822982=perlquestion: print w/ replies, xml ) Need Help??
jonnyfolk has asked for the wisdom of the Perl Monks concerning the following question:

I need to provide a script to install on Windows 2003 IIS in the www directory. I don't have this to test. Would the following code function directly or does it need module install or other tweaking?
#!/usr/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use CGI qw/:standard/; use LWP::Simple; print "Content-type:text/html\n\n"; my $query = $ENV{'QUERY_STRING'}; my $content = get("http://www.google.com?$query"); die "Couldn't get it!" unless defined $content; print $content;

Comment on LWP::Simple on Windows 2003 IIS
Download Code
Re: LWP::Simple on Windows 2003 IIS
by ahmad (Hermit) on Feb 13, 2010 at 07:02 UTC

    All the modules you used are already shipped with perl itself (Core Modules).

    You don't have to install any additional module

    See below

    while not both of them are core modules there's a good chance that you already have LWP::Simple if you use Activestate's perl package.

      $ corelist CGI LWP::Simple CGI was first released with perl 5.004 LWP::Simple was not in CORE (or so I think)
      CGI is core, LWP is not
Re: LWP::Simple on Windows 2003 IIS
by CountZero (Bishop) on Feb 13, 2010 at 09:25 UTC
    Try it or ask the webserver's administrator if LWP is installed.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://822982]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2014-09-02 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls