Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
Syntactic Confectionery Delight
 
PerlMonks  

Re: Using FTP Without any Modules

by turo (Friar)
on May 18, 2006 at 07:39 UTC ( [id://550218]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Using FTP Without any Modules

blazar, maybe he wants to migrate from ksh to an oister shell :-P jejeje

anyway, i haven't sleept too much today, so for keeping me on, i decided to translate it:

#!/usr/bin/perl # Give port or mention server name my $ip='some.machine'; #User ID to login into remote server my $user='anonymous'; #Password to login in remote server my $pass='super-secret'; open (FTP, "|-", "/usr/bin/ftp -n"); print FTP <<EOF ; open $ip quote user $user quote pass $pass lcd bye EOF print "*$_\n" while (<FTP>); close FTP;

perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'

Janitored by Corion: Changed machines and login/password

Replies are listed 'Best First'.
Re^2: Using FTP Without any Modules
by madtoperl (Hermit) on May 18, 2006 at 07:57 UTC
    hi

    I got the following error when I run your code.

    Too many arguments for open at fileconcat.pl line 70, near ""/usr/bin/ +ftp -n")" Execution of fileconcat.pl aborted due to compilation errors.

      You have an older version of Perl, you would do well to upgrade if you can.

      /J\

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://550218]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.