in reply to
Expect & top
You should be passing the command ("top") to spawn(), not send(). send() is used to give the spawned command input. use exp_internal() to debug the interaction between the command's output and the input you send to it.
Comment on
Re: Expect & top
In Section
Seekers of Perl Wisdom