Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP in Perl ..

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I want to open a FTP connection, submit a file using a perl file. I have a script in shell and I want to convert that to perl. Here is the shell script:

#---------------------------------------------------------------------
#!/bin/ksh

file=$HOME/testent/data.in
host=`uname -n`
port=`$HOME/testent/ftpperl1`
#port=$Port
sender=GXSTESTUSER1
password=PASSWORD
receiver=GXSTESTUSER2
aprf=Testcos
type=b
snrf=$$

ftp -n<<EOF
open $host $port
user $sender $password
put $file %$receiver%$aprf%$snrf%$type
quit
EOF


If you can solve my problem, I will appreciate it.

Gagan
 
Isn;t there a file that comew tieh Perl that will allow you to convert shell files into Perl files?

I am assuming that you are running Linux.Unix, so I don't know if your version of Perl comes with it, but one Windows machines, there are some .bat files that will do it for you.

Hope this helps.

-Vic [sig]<p>vic cherubini<br><a href=mailto:malice365@hotmail.com>malice365@hotmail.com</a><br><a href= software</a><br>====<br>
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director<br>
Wants to Know: Java, Cold Fusion, Tcl/TK<br>
====[/sig]
 
Gag_bag,

Have a look at the standard module Net::FTP -- well documented, easy to use and reliable. [sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>Making mistakes, so you don't have to. &lt;grin&gt;[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top