On Thu, 8 Nov 2001, Mark Johnson wrote: > Is there another way to get access to the environment variables... this > works, but it seems kind of kludgy.. > > my $machine = `echo \$HOSTNAME`;
$ENV{HOSTNAME}; > Also, is there a way to detemine whether the script is being executed by > root? > > I tired doing: > > my $is_root = `echo \$UID` die "Only root can run this script" if getpwuid($<) ne 'root'; -- Brett http://www.chapelperilous.net/ ------------------------------------------------------------------------ So much depends upon a red wheel barrow glazed with rain water beside the white chickens. -- William Carlos Williams, "The Red Wheel Barrow" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]