Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Forced to modify perl telnet script to use both telnet and ssh

by philiprbrenan (Monk)
on Sep 01, 2012 at 19:56 UTC ( #991190=note: print w/replies, xml ) Need Help??


in reply to Re^3: Forced to modify perl telnet script to use both telnet and ssh
in thread Forced to modify perl telnet script to use both telnet and ssh

Please go through your script adding statements like this:

if ($device->{supportsSSH}) {SSH code} else {Telnet code}

After a while you may notice that blocks of code keep getting repeated. Please consider refactoring them into sub {}'s as you work through your script.

  • Comment on Re^4: Forced to modify perl telnet script to use both telnet and ssh
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991190]
help
Chatterbox?
[Eily]: :)
[Eily]: or I might be tempted to send him an Acme::EyeDropsed file next time
[Eily]: Acme::Bleach is tempting, but it will look like I'm just using the one module that does precisely exactly what he wants

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-04-26 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (483 votes). Check out past polls.