in reply to recognizing OS

This will tell you what OS it's running on, and it'll also give you the release number:

#!/usr/bin/perl use strict; use warnings; use POSIX qw(uname); my ($uname_s, $uname_r) = (POSIX::uname())[0,2]; print "$uname_s\n", "$uname_r\n";

Replies are listed 'Best First'.
Re^2: recognizing OS
by doom (Deacon) on May 03, 2008 at 22:46 UTC
    This isn't portable to systems that are non-POSIX, is it?
      It does work on Strawberry and ActiveState Perl for Windows (tested on 5.8.8 and 5.10.0 of each). I'm not sure on what other non-Unixy platforms it may fail, though.