On 26 Jun 2001 14:38:26 +0200, Matija Papec wrote:
>
> Greetings,
>
> is there a more elegant way to find out who is running a script? %ENV is
> not reliable and it doesn't contain USER when booting the system, and
> "whoami" is external command(yuck :) ) tnx!
>
>
>
> --
> Matija
>
<snip href="perldoc -f getlogin">
getlogin
Implements the C library function of the same
name, which on most systems returns the current
login from /etc/utmp, if any. If null, use
"getpwuid".
$login = getlogin || getpwuid($<) || "Kilroy";
Do not consider "getlogin" for authentication: it
is not as secure as "getpwuid".
</snip>
--
Today is Boomtime, the 31st day of Confusion in the YOLD 3167
Frink!
- RE: Use Strict King, Jason
- use strict Peter Lemus
- Re: use strict Brett W. McCoy
- Re: use strict David H. Adler
- use strict Silvio Luis Leite Santana
- Re: use strict Jeff 'japhy' Pinyan
- Re: use strict Silvio Luis Leite Santana
- Re: use strict Peter Scott
- Re: use strict Jeff 'japhy' Pinyan
- whoami? Matija Papec
- Re: whoami? Chas Owens
- Re: whoami? Randal L. Schwartz
- Re: whoami? Brett W. McCoy
- Re: whoami? Paul
- Re: whoami? Chris Hedemark
- Re: whoami? Chas Owens
- use strict Octavian Rasnita
- Re: use strict Jason Purdy
- Re: use strict Frank
- Re: use strict Dave Benware
- Re: use strict dhoubrechts
