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

Re: problem in connecting remote host

by perladdict (Chaplain)
on Dec 07, 2006 at 15:33 UTC ( #588363=note: print w/replies, xml ) Need Help??

in reply to problem in connecting remote host

define the prompt as
$prompt = 'bash-2.03\#
print $prompt;
it will prints the exact prompt which u want to match in that variable
one more error u have to correct by giving space after '/login: $/i'
as well as '/paswd: $/',after these changes script will works fine

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://588363]
[choroba]: Perl to the rescue!
[Corion]: hippo: At least for the German translation, the wordplay is translated as well
[Discipulus]: always! but if i can ask choroba why you always use the inverted (to me) form 1 == $.?
[choroba]: To avoid accidental overwriting of the variable in if ($x = 3)
[karlgoethebier]: Corion: Auch in hessisch? Mer wasses net.
[Corion]: Hmm - I'm not sure, I haven't read the mundart/slang translations ;)
[Eily]: $F[1] =~ s/^0//r could be written as (0+$F[1]). It's less explicit though

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2017-05-24 08:40 GMT
Find Nodes?
    Voting Booth?