Perl Script to Store HTTP Request Response

Write HTTP Response into a File

This below Perl script is to write the HTTP request response into a file

use LWP::UserAgent;

$user_agent = new LWP::UserAgent;

$request = new HTTP::Request('GET', 'http://www.cpan.org/doc/FAQs/index.html');

$response = $user_agent->request($request);

open FILEHANDLE, ">file.txt";

print FILEHANDLE $response->{_content};

close FILEHANDLE;



Related Topic PHP Programming Best Practices
Search Engine Friendly Redirect 301
How to Create Scalar Values Manipulation in Perl Scripting
What is Scalar Values Manipulation in Perl Scripting
How to set the HTTP Cookie Values

nScraps.com 2011   Privacy Policy  Terms of Service  Feedback