<[EMAIL PROTECTED]> wrote: > > Rob Dixon wrote: > > > > Bob Showalter wrote: > > > > > > This sounds fine in principle. Many of the standard Perl > > > modules do this kind of thing. You use the built-in $^O > > > variable to detect the operating system. If you want to > > > see > > > an example, do 'perldoc -m Cwd' to browse the source code > > > of the Cwd module. > > > > > > Instead of command_header.pl, consider making a > > > full-fledged module. It isn't hard. Start by reading > > > 'perldoc perlmod'. > > > > > > Also, read 'perldoc perlport' for general info on writing > > > cross-platform perl. > > > > The $^O variable indicates the platform on which the > > currently executing version of perl was built. If you're > > running Perl on a different platform from the one where it > > was built then I don't think it's likely to work too well! > > Does anybody know different? > > I appreciate your feed back but you clearly don't understand. > > The perl script I'll be running will be executed only from one > Location and that is from my laptop. I'll be connected to a > network In which the script will be using Net::Telnet module > to communicate To the other systems. No need to put any > scripts on any other machine Period!!!! > > So the $^O variable will only work if you run A PERL SCRIPT on > that System. The purpose of the script is to discover what > systems are on A given network. > > Again I don't need to run perl on multiple machines. That will > totally Defeat the purpose of the scripts. If you don't know > about CPAN then Look at http://www.cpan.org. That is where I > got the Net::Telnet module from.
I know that Bob knows about the CPAN. He will also know about the 'Net::Telnet' module that you're using. What both he and I 'clearly' didn't understand was that you were using it: you make no mention of it in your original post. If you are running 'A PERL SCRIPT' on a machine that somehow has remote access to an external system, and your question is about that external system, then surely it makes sense to explain the mechanism of that access? Your answer, at this stage, is to open an interactive telnet session on your laptop to any one of your remote systems. If you can establish the type of that system from the session then you can do the same thing from Perl. Let us know if you need any more help. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]