Jie,
I am not an expert, but since participating in this wonderful list, it has
been inferred
that one should shy away from system commands when perl actually has modules
that are designed for the desired goal.  I would check out IO::Socket or
Net::Telnet.

Craig
[EMAIL PROTECTED]
Pager
Numeric: 1-877-895-3558
Email pager: [EMAIL PROTECTED]
--------------------------------------------------------------
You will never find time for anything.
If you want time, you must make it.

Charles Buxton

----- Original Message -----
From: "Jie Meng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 10, 2001 11:02 AM
Subject: A simple question


Dear all,

I plan to write a simple remote connection script, and then "ls" the content
of the current directory, input like

telnet hostname
username
password
ls

I use the following script:

system ("telnet hostname");
<STDOUT> = "username\n";
<STDOUT> = "password\n";
system ("ls");

It failed in the <STDOUT> syntax.

Can anyone kindly give me a hint?

Thanks,

Jie

____________________________________________________________________
Get free email and a permanent address at http://www.amexmail.com/?A=1

Reply via email to