> I am writing a telnet interface to a system and I need to send
> a break to wake the remote system up.
>
> How do I send a BRKINT?
You probably mean how to send a BREAK, which is special to telnet and
not a regular ASCII character. If not, just send the corresponding
ASCII character (Ctrl-C? Ctrl-Z?).
May I direct your attention to Net::Telnet, which provides a thorough
interface to (I think) all aspects of the telnet protocol ('break' in
that case) and also has the advantage that no process has to be
spawned. And you can use it together with Expect by passing the
Net::Telnet filehandle to exp_init(), as reported by at least one user.
Be sure to keep a copy of the original filehandle around for access to
the telnet functionality, as Expects exp_init rather rudely reblesses
the filehandle (I'll fix that in a future release).
Hope this helps,
Roland
--
RGi...@cp...
|