On Tue, 26 Jun 2001, Matija Papec wrote:

> 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!

my $user = getpwuid($<);

$< contains the uid of the user.  $> if it's a setuid program.

-- Brett
                                   http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
I'm pretending that we're all watching PHIL SILVERS instead of RICARDO
MONTALBAN!

Reply via email to