http://qs321.pair.com?node_id=991095


in reply to Forced to modify perl telnet script to use both telnet and ssh

...tasked with modifying a perl script...refuses to rewrite existing script...
Which is it? It isn't clear to me which problem you're trying to solve, and what tools you have available. If you have an ssh-based solution already, then all you need to do is try telnet; if you get 'connection refused', then you have to use ssh. As for openCSW vs CPAN, they aren't mutually exclusive. If the prebuilt module you want isn't on openCSW then you can download and build it from CPAN (unless your boss won't let you do this either). Maybe if you posted what you do now, and where it needs to diverge to support ssh it would be clearer.

Of course, you *could* just write it in Expect, call the finished product newscript.pl (but with '#! expect' at the top), and he'd be none the wiser...

fnord