By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,710 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,710 IT Pros & Developers. It's quick & easy.

Pearl: how would I send router command output to a varaible and a file

P: 2

I'm trying to execute a command on a router and then storing that output to a variable e.g. $output..I don't know how to do it in Pearl..Any help would be appreciated in this regard.

Aug 3 '10 #1
Share this Question
Share on Google+
4 Replies

Expert 100+
P: 785
Aug 3 '10 #2

Expert 100+
P: 983

How is the script supposed to connect to the router? Serial port? Telnet? HTTP?

Please give us some real information, if you want help.

Aug 3 '10 #3

P: 2
Thanks for the pointer....I've connected to router via telnet....This is what I used to do in TCL, but don't know how would we do in Perl..

set output [$router exec "sh run | inc trap"]

Aug 4 '10 #4

Expert 100+
P: 983
I'd recommend the module. You can find it on CPAN here.

Hopefully that gets you off the ground.
Aug 4 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.