perl_devel has asked for the wisdom of the Perl Monks concerning the following question:
Just to solve a problem of a system command not executing in a perl script triggered thru mail.But works if it executed as a cgi or comman line
I just created a script that will just output the contents of the system command .I want to capture this contents in a perl script.
How will i do it ? I just replicated some codes on net that doesnt work
use LWP::Simple; use LWP::UserAgent; use HTTP::Request; use HTTP::Response; use HTML::LinkExtor; $URL="http://www.perl.com/"; my $ua = LWP::UserAgent->new(); $content=$ua->get($URL); use Data::Dumper; print Dumper($content);
Can't locate object method "get" via package "LWP::UserAgent"
can any body suggest how to attain this?
20050728 Cleaned up by Corion: Removed PRE tags, put CODE and P tags in
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting contents of URL
by monarch (Priest) on Jul 28, 2005 at 04:43 UTC | |
by perl_devel (Friar) on Jul 28, 2005 at 04:56 UTC | |
by jbrugger (Parson) on Jul 28, 2005 at 05:10 UTC | |
|
Re: Getting contents of URL
by gopalr (Priest) on Jul 28, 2005 at 05:13 UTC | |
|
Re: Getting contents of URL
by tulsyan (Beadle) on Jul 28, 2005 at 05:22 UTC | |
|
Re: Getting contents of URL
by jbrugger (Parson) on Jul 28, 2005 at 04:45 UTC | |
|
Re: Getting contents of URL
by sk (Curate) on Jul 28, 2005 at 05:15 UTC | |
|
Re: Getting contents of URL
by ikegami (Patriarch) on Jul 28, 2005 at 06:03 UTC |