0

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

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.