> on the program line
> $t= new Net::Telnet (Timeout=>10; Prompt => '/bash\$ $/');
>
> What is the Prompt portion mean? I think it's saying look for a bash$ prompt minus
>the $. I don't know. Please explain.
The Prompt is a regular expression (that's why there are the slashes)
The module will read (and discard) all greeting messages and
whatever until it reads a line that matches the Prompt.
ONly then will it send your commands.
> Also, how would I set up the Prompt command to have the system look for the prompt
>ftp>
Prompt => '/ftp>\s*$/'
= look for ftp> folowed only by whitespace.
> My original problem was connecting via telnet from one unix
> machine to another. I was able to make it work, once I took the
> "prompt" portion out of my program.
Yeah, the module kept waiting for the prompt to appear.
> Past history...
> Now I'm trying to ftp from the machine I telneted to.
> My commands without perl are
> ftp
> open machine.name.com
> root
> password
>
> I'm not able to get the ftp to work from inside my telneted session.
Don't know. I'm not a unix person actualy.
> Maybe I need to have the net::telnet module set up on the machine
> I just telneted to.
I doubt it.
Jenda
== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
: What do people think?
What, do people think? :-)
-- Larry Wall in <[EMAIL PROTECTED]>
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users