SPUG: Net::Telnet issues.....
Shawn Wagner
shawnw at speakeasy.org
Wed Aug 20 01:00:29 CDT 2003
On Tue, Aug 19, 2003 at 02:54:56PM -0700, Nord, Chris wrote:
> Gurus,
>
> I am having some trouble capturing data while using the Net::Telnet
> module. Line: my @data = $t->cmd('find Routing_Label'); should save the
> results of the command 'find Routing_Label', but it does not. However
> if you view the Input_Log correct results of 'find Routing_Label' are
> captured. I have tried various concoctions using $t->waitfor() and
> $t->print() as per the module documents but with the same results...
>
> Any ideas?
>
snippage
> $prompt = '/\[awspsx1\]\> /';
You're changing the $prompt variable, but you're not letting $t know that
it's now supposed to use a different prompt.
Try $t->prompt('/\[awspsx1\]> /'); instead and see if that works.
>
> print "print data here!!\n";
>
> my @data = $t->cmd('find Routing_Label');
> print @data;
>
> # @data remains empty!
--
Shawn Wagner
shawnw at speakeasy.org
More information about the spug-list
mailing list