Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2018-02-20 15:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (271 votes). Check out past polls.

    Notices?