perl and internt functions

Discussion in 'Perl Misc' started by dana livni, Feb 8, 2004.

  1. dana livni

    dana livni Guest

    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
    dana livni, Feb 8, 2004
    #1
    1. Advertising

  2. dana livni <> 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
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Feb 8, 2004
    #2
    1. Advertising

  3. Tad McClellan <> wrote:
    > dana livni <> 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
    Steven Smolinski, Feb 8, 2004
    #3
  4. dana livni

    dana livni Guest

    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 <> wrote in message news:<>...
    > dana livni <> 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?
    dana livni, Feb 8, 2004
    #4
  5. dana livni <> 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
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Feb 8, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xiangliang Meng
    Replies:
    1
    Views:
    1,590
    Victor Bazarov
    Jun 21, 2004
  2. John Goche
    Replies:
    10
    Views:
    735
    Marcus Kwok
    Dec 8, 2006
  3. mafiQ
    Replies:
    0
    Views:
    471
    mafiQ
    Apr 22, 2009
  4. py
    Replies:
    5
    Views:
    299
    Daniel DeLorme
    Mar 24, 2007
  5. Dilbert
    Replies:
    0
    Views:
    838
    Dilbert
    Nov 10, 2011
Loading...

Share This Page