#!/usr/bin/perl -w
#
# osname.pl - Is there any difference between $^O and uname -s?
#
# Synopsis:
#
#	osname.pl
#
# The purpose of this Perl script is to determine whether
# there is any difference between the value of the internal
# Perl variable $^O (AKA $OSNAME) and the output of a uname -s.
# 
# ==============================================================
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 
# 2 of the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be 
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.  See the GNU General Public License for more details.
# 
# Original source:
#	Copyright (c) 1999, 2000 SAIC (Bruce W. Mohler)
# 
# Contributed source:
#	Copyright (c) 1999, 2000 <author>
# 
# ==============================================================
# 
# $Header$
# 
# $Revision$
#
# $Log$

require 5.003;

# use Getopt::Std;
use FileHandle;
# use Sys::Hostname;
# more "use" statements below in FigureOutWhatOSWereRunning()
# use common;

###########################################################################
# Global Variables
###########################################################################

# where commands are located
# CUSTOMIZE
$UnameCommand = "/bin/uname";


###########################################################################
# Subroutines
###########################################################################

sub DisplayInformation
{
	# what is the name of the OS?
	my $OSName = `$UnameCommand -s`;
	chomp($OSName);
	print "uname -s returns $OSName...\n";

	# what does Perl say?
	print "Perl says $^O...\n";

	return;
}


###########################################################################
# Mainline
###########################################################################

# strip path off of script name
$0 = (@discard = split(/\//, $0))[$#discard];

STDOUT->autoflush(1);			# from Perl Cookbook section 7.12

DisplayInformation();

###########################################################################
# We're done!
###########################################################################
exit(0);

