Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Net::telnet question

by benlaw (Scribe)
on Apr 22, 2008 at 13:21 UTC ( [id://682166]=note: print w/replies, xml ) Need Help??


in reply to Re: Net::telnet question
in thread Net::telnet question

yes, but my company has so many restriction on development... so what I can is "adapt" to their environment, but I can't change it.. ~o~(cry)

Replies are listed 'Best First'.
Re^3: Net::telnet question
by Fletch (Bishop) on Apr 22, 2008 at 13:38 UTC

    You misunderstand; I'm not saying change the default environment, I'm saying send a command to set the transient PS1 in your running shell to something fixed. The default Net::Telnet value of qr/[\$%#>] $/ should be good enough to get you to where you can send something (and if it's not then build on it until it is), then set your fixed prompt as the first command.

    $tel->cmd( "PS1='fixed> '; export PS1" ); $tel->prompt( qr/fixed> $/ );

    That setting is not going to persist past the one process you're talking to, but it allows you to look for a known marker in your sessions (and/or dynamically tweak the prompt if you ever might mistake output data for the prompt).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://682166]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2026-02-10 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    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.