in reply to how to recognize windows and linux os

Another option is to forget OS detection and just look for the files.

open (FH, 'c:/snmpauto') || # I don't know Windows so this path syntax may be off open (FH, '/root/snmpauto') || die (q(Couldn't open the file!));

Replies are listed 'Best First'.
Re^2: how to recognize windows and linux os
by Anonymous Monk on Jan 30, 2006 at 15:01 UTC
    Or ask the user where snmpauto resides
      That would require trusting the user. From the locations where he's chosen to put these files, I take it only the system administrator is supposed to be able to alter the contents of them. (I still would have put it under /etc rather than /root though.)