Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > perl and internt functions

Reply
Thread Tools

perl and internt functions

 
 
dana livni
Guest
Posts: n/a
 
      02-08-2004
i need to connect a certain url and save his source in a directory on
my personal computer.

how do i do it?
hoping someone could help me
 
Reply With Quote
 
 
 
 
Tad McClellan
Guest
Posts: n/a
 
      02-08-2004
dana livni <(E-Mail Removed)> wrote:
> i need to connect a certain url and save his source in a directory on
> my personal computer.
>
> how do i do it?



use LWP::Simple; # untested
get_store 'http://www.perl.org', 'some/dir/perl_org.html';


See also this Perl FAQ:

How do I fetch an HTML file?


--
Tad McClellan SGML consulting
http://www.velocityreviews.com/forums/(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
 
 
 
Steven Smolinski
Guest
Posts: n/a
 
      02-08-2004
Tad McClellan <(E-Mail Removed)> wrote:
> dana livni <(E-Mail Removed)> wrote:
>> i need to connect a certain url and save his source in a directory on
>> my personal computer.
>>
>> how do i do it?

>
>
> use LWP::Simple; # untested
> get_store 'http://www.perl.org', 'some/dir/perl_org.html';

^

I believe you wanted getstore('url', 'filename');

To the OP: see perldoc LWP::Simple.

Steve
 
Reply With Quote
 
dana livni
Guest
Posts: n/a
 
      02-08-2004
i tried to do so and i get this error:
Undefined subroutine &main::get called at link_list.pl line 11.

so i add this to my script:
my $content = LWP::simple->get("http://www.perl.com/");

and then i got this error:
Can't locate object method "get" via package "LWP::simple" (perhaps you forgot t
o load "LWP::simple"?) at link_list.pl line 11.

Tad McClellan <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>.. .
> dana livni <(E-Mail Removed)> wrote:
> > i need to connect a certain url and save his source in a directory on
> > my personal computer.
> >
> > how do i do it?

>
>
> use LWP::Simple; # untested
> get_store 'http://www.perl.org', 'some/dir/perl_org.html';
>
>
> See also this Perl FAQ:
>
> How do I fetch an HTML file?

 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      02-08-2004
dana livni <(E-Mail Removed)> wrote:
> i tried to do so and i get this error:
> Undefined subroutine &main::get called at link_list.pl line 11.



Did you load LWP::Simple?

use LWP::Simple;


> so i add this to my script:
> my $content = LWP::simple->get("http://www.perl.com/");

^
^
^
Case matters.

my $content = LWP::Simple->get("http://www.perl.com/");


> and then i got this error:
> Can't locate object method "get" via package "LWP::simple" (perhaps you forgot t
> o load "LWP::simple"?) at link_list.pl line 11.



Did you load LWP::Simple?


--
Tad McClellan SGML consulting
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveState Perl and MinGW [was: Perl 5.14 Windows Strawberry Perl 64 bits] Dilbert Perl Misc 0 11-10-2011 02:20 PM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 01-23-2011 05:00 AM
internt kev Computer Support 1 11-07-2004 06:24 PM
please help me in distinguish redefining functions, overloading functions and overriding functions. Xiangliang Meng C++ 1 06-21-2004 03:11 AM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM



Advertisments