my $machine = $ENV{HOSTNAME};

martin



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`;
> 
> Also, is there a way to detemine whether the script is being executed by
> root?
> 
> I tired doing:
> 
> my $is_root = `echo \$UID`
> 
> but for some reason this doesn't work, but it works in a bash script...it
> appears that $UID isn't available or something...
> 
> thanks!
> 
> 
> 
> 
> 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to