CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: access an external file from script: Edit Log



ebennawy
Deleted

Apr 2, 2001, 6:57 AM


Views: 522
Re: access an external file from script

hope this helps,
maybe you could set up an FTP session to retrieve a copy of the file, and then open the copy into a filehandle as usual...
like this...
NOTE: oops! forgot all about the part where you change working directory. Sorry. Here it is, newly edited...
...
#!/usr/bin/perl -w

use Net::FTP;

my $path = "where/the/file/is";
my $file = "filename";
my $user = "username";
my $pass = "password";

$ftp = Net::FTP->new("www.somedomain.com");
$ftp->login($user, $pass);
$ftp->cwd($path);
$ftp->get($file);

...

Good luck.
Bennawy, E.

Failure is not an option. It is a privelege reserved for those who try.

(This post was edited by ebennawy on Apr 2, 2001, 6:30 AM)


This post has not been edited


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives