joshuahess has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I have a simple script that uses LWP::SIMPLE to do an http get. It works fine on my newer machines. I have a few older servers running SCO OpenServer 5.0.5 and perl version 5.004_04. I haven't been able to find a version of LWP::SIMPLE that will work for that version. Is there another method of sending an http get request that could work? Is there a place I could find the necessary LWP::SIMPLE and dependencies for a version of perl that old? Unfortunately, upgrading the perl versions isn't an option. In short, the script is:
use LWP::Simple; $url = 'http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService& +Version=2005-03-23&Operation=ItemSearch&ContentType=text%2Fxml&Subscr +iptionId=xxxxxxxxxx&SearchIndex=Music&Keywords=5099921688607&Response +Group=OfferFull,Small'; my $content = get $url;
Any help would be most appreciated. Thanks! -Josh

Replies are listed 'Best First'.
Re: LWP::SIMPLE perl version 5.004_04
by szabgab (Priest) on Jul 26, 2008 at 22:48 UTC
    Try the platform matrix and pick an older version of the module.

    For example I picked 5.50 and it has a successful test report on Solaris on 5.003 so that might also work on SCO.

Re: LWP::SIMPLE perl version 5.004_04
by broomduster (Priest) on Jul 26, 2008 at 23:48 UTC
    You could also try HTTP::Lite
    use strict; use warnings; use HTTP::Lite; my $url = 'http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceServi +ce&Version=2005-03-23&Operation=ItemSearch&ContentType=text%2Fxml&Sub +scriptionId=xxxxxxxxxx&SearchIndex=Music&Keywords=5099921688607&Respo +nseGroup=OfferFull,Small'; my $http = new HTTP::Lite; my $req = $http->request( $url ) or die "Unable to get document: $! +"; print $http->body(), "\n";

    For me, this returns the same complaint noted by Khen1950fx, but that's also what I get with LWP::Simple

      HTTP:Lite works like a charm. Many thanks!
Re: LWP::SIMPLE perl version 5.004_04
by Khen1950fx (Canon) on Jul 26, 2008 at 22:47 UTC
    It worked for me on 5.8.8; however, it complains of an invalid AWSAccessKeyId.

    Update: I tried it with libwww-perl-5.008, but I had to change "require 5.005" to "require 5.004_04" in the Makefile and libs. It worked...