Link to home
Start Free TrialLog in
Avatar of huffmana
huffmanaFlag for United States of America

asked on

Ha Da Heck is $^O

There is a function in a Perl program I am trying to understand and am lost at the statement $^O.  What is a $^O variable (note that O is an uppercase "o" like oh)

sub checkAndRemaneCore()
{
  my ($name, $pid, $objRef) = @_;
  printMessage("$name has exited due to internal error");
  if( ($^O eq "MSWin32") ir ($^O eq "Windows_NT") )
  {
    sAgentUtils::deleteExtraAgentCores_Win($EMHOME);
    return;
  }
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of huffmana

ASKER

Thanks Fellas, Perl is like the ocean, I know about my little corel reef, and it is usually enough, but those barracudas pass by sometimes :-)
Best Allan
perldoc perlvar
       $OSNAME
       $^O     The name of the operating system under which this copy of Perl
               was built, as determined during the configuration process.  The
               value is identical to $Config{'osname'}.  See also Config and
               the -V command-line switch documented in perlrun.

               In Windows platforms, $^O is not very helpful: since it is
               always "MSWin32", it doesn't tell the difference between
               95/98/ME/NT/2000/XP/CE/.NET.  Use Win32::GetOSName() or
               Win32::GetOSVersion() (see Win32 and perlport) to distinguish
               between the variants.