Reputation: 1
We have perl version 5.8.4 installed on our servers. I am trying to invoke a HTTP URL from within the perl script and based on the output that the HTTP URL returns I have a logic to be executed.
I am very new to perl and am looking for help to achieve this. The Cpan and other modules seem to be unavailable with the current version we have.
Please let me know how we could achieve this.
Thanks, Sachin
Upvotes: 0
Views: 136
Reputation: 69264
We have perl version 5.8.4 installed on our servers
Then that should be the first thing that you fix. 5.8.4 is ten years old. It is completely unsupported.
The Cpan and other modules seem to be unavailable with the current version we have.
No. CPAN works fine with versions of Perl back far earlier than 5.8.4. If you are having a problem using them that is a local problem that you should work on getting fixed. Good Perl programming is a case of wiring together the correct CPAN modules. If you can't install CPAN modules then you are missing most of the power of Perl.
The correct answer to your problem is to install LWP::Simple and use its get
function. If you don't want to do that, then reading the source code for that module will show you the lower level code that you would need to write.
Upvotes: 0
Reputation: 35198
Take a look at LWP
and LWP::simple
.
Even older versions of perl will have support for this library, although you may have to install it via cpan
.
Upvotes: 1