in reply to Re^2: Net::telnet question
in thread Net::telnet question
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.
|
|---|