On Thu, 8 Nov 2001, Tomasi, Chuck wrote:
> > die "Only root can run this script" if getpwuid($<) ne 'root';
>
> getpwuid($<) returns the entire passwd entry and would require a little
> parsing. How about something more like:
>
> die "Only root can run this script" if ($< != 0);
getpwuid returns the username in a scalar context.
-- Brett
http://www.chapelperilous.net/
------------------------------------------------------------------------
It's hard to argue that God hated Oklahoma. If He didn't, why is it so
close to Texas?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]