Loading ...
Sorry, an error occurred while loading the content.

Opening a file from a website

Expand Messages
  • Steven Hill
    I want to open a file from a website for manipulation. My code is: open (FILENAME, http:// ) or die( Cannot open file: $! ); # work on the file
    Message 1 of 6 , Jun 4, 2000
    • 0 Attachment
      I want to open a file from a website for manipulation. My code is:

      open (FILENAME, "http://<filename>") or die("Cannot open file: $!");
      # work on the file
      close FILENAME;

      I am getting a 'No such file or directory' error.

      I have tried this both offline (hoping to connect automatically) and
      online.. same result both times.

      Hope someone can help - thanks.

      Steve Hill
      stevhill@...
    • Greg Webster
      What you want to do is use the LWP:Simple module. Here is a small example of LWP code: #!/usr/bin/perl use LWP::Simple; $website =
      Message 2 of 6 , Jun 4, 2000
      • 0 Attachment
        What you want to do is use the LWP:Simple module.

        Here is a small example of LWP code:

        #!/usr/bin/perl

        use LWP::Simple;

        $website = 'http://www.geekrights.org/index.shtml';
        $content = (get $website);

        Greg




        On Sun, 04 Jun 2000, you wrote:
        > I want to open a file from a website for manipulation. My code is:
        >
        > open (FILENAME, "http://<filename>") or die("Cannot open file: $!");
        > # work on the file
        > close FILENAME;
        >
        > I am getting a 'No such file or directory' error.
        >
        > I have tried this both offline (hoping to connect automatically) and
        > online.. same result both times.
        >
        > Hope someone can help - thanks.
        >
        > Steve Hill
        > stevhill@...
        >
        >
        >
        > ------------------------------------------------------------------------
        > Take your development to new heights. Work with clients like Dell and
        > pcOrder. Submit your resume to jobs@.... Visit us at
        > http://click.egroups.com/1/4358/2/_/12898/_/960125490/
        > ------------------------------------------------------------------------
        --
        <>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<>
        / \ GREG WEBSTER - greg@... / \/ \/ \
        \ / http://www.geekrights.org \ /\ /\ /
        <>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<>
      • Gordon Stewart
        ... thanks for the code - Ive tested it, & my isp/host i m using http://www.netfirms.com doesnt seem to support it. (i ve e-mailed them, but i ll doubt they ll
        Message 3 of 6 , Jun 4, 2000
        • 0 Attachment
          --- Greg Webster <greg@...> wrote: >
          > What you want to do is use the LWP:Simple module.
          >
          > Here is a small example of LWP code:
          >

          thanks for the code - Ive tested it, & my isp/host i'm
          using http://www.netfirms.com doesnt seem to support
          it. (i've e-mailed them, but i'll doubt they'll add
          the module to their system - i'll wait a few days for
          their reply.)

          In the meantime - do any of you know another free isp
          / host that allows CGI - with this module ?

          Also wghich allows in-comming e-mail to 'activate' /
          'run' a CGI/perl script - seperate project.

          I dont intend on setting up a 'permanent' site - just
          big enough to test things on etc & design/finish my
          projects.

          <cut>

          Thanks.

          Gordon.


          =====
          ========
          http://homepages.ihug.co.nz/~gordon-s
          E-Groups Lists of lists

          ____________________________________________________________
          Do You Yahoo!?
          Get your free @... address at http://mail.yahoo.co.uk
          or your free @... address at http://mail.yahoo.ie
        • Greg Webster
          Try Crosswinds.net Greg ... -- - - - - - - - - - - - - / GREG WEBSTER - greg@gadgeteer.net / / / /
          Message 4 of 6 , Jun 4, 2000
          • 0 Attachment
            Try Crosswinds.net

            Greg

            On Sun, 04 Jun 2000, you wrote:
            > --- Greg Webster <greg@...> wrote: >
            > > What you want to do is use the LWP:Simple module.
            > >
            > > Here is a small example of LWP code:
            > >
            >
            > thanks for the code - Ive tested it, & my isp/host i'm
            > using http://www.netfirms.com doesnt seem to support
            > it. (i've e-mailed them, but i'll doubt they'll add
            > the module to their system - i'll wait a few days for
            > their reply.)
            >
            > In the meantime - do any of you know another free isp
            > / host that allows CGI - with this module ?
            >
            > Also wghich allows in-comming e-mail to 'activate' /
            > 'run' a CGI/perl script - seperate project.
            >
            > I dont intend on setting up a 'permanent' site - just
            > big enough to test things on etc & design/finish my
            > projects.
            >
            > <cut>
            >
            > Thanks.
            >
            > Gordon.
            >
            >
            > =====
            > ========
            > http://homepages.ihug.co.nz/~gordon-s
            > E-Groups Lists of lists
            >
            > ____________________________________________________________
            > Do You Yahoo!?
            > Get your free @... address at http://mail.yahoo.co.uk
            > or your free @... address at http://mail.yahoo.ie
            >
            > ------------------------------------------------------------------------
            > IT Professionals: Match your unique skills with the best IT projects at
            > http://click.egroups.com/1/3381/2/_/12898/_/960141638/
            > ------------------------------------------------------------------------
            --
            <>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<>
            / \ GREG WEBSTER - greg@... / \/ \/ \
            \ / http://www.geekrights.org \ /\ /\ /
            <>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<><>-<>
          • Gordon Stewart
            ... Thanks Greg. Gordon. ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at
            Message 5 of 6 , Jun 5, 2000
            • 0 Attachment
              --- Greg Webster <greg@...> wrote:
              > Try Crosswinds.net

              Thanks Greg.

              Gordon.


              ____________________________________________________________
              Do You Yahoo!?
              Get your free @... address at http://mail.yahoo.co.uk
              or your free @... address at http://mail.yahoo.ie
            • Gordon Stewart
              ... Crosswinds.net Further - ive tried that site - & created an account - but they dont allow you to create/upload your own scripts. :-( I ll keep looking.
              Message 6 of 6 , Jun 5, 2000
              • 0 Attachment
                --- Greg Webster <greg@...> wrote: > Try
                Crosswinds.net

                Further - ive tried that site - & created an account -
                but they dont allow you to create/upload your own
                scripts. :-(

                I'll keep looking.

                Gordon.


                ____________________________________________________________
                Do You Yahoo!?
                Get your free @... address at http://mail.yahoo.co.uk
                or your free @... address at http://mail.yahoo.ie
              Your message has been successfully submitted and would be delivered to recipients shortly.