take a look at any of these (depending on your OS):

the user id's are in
$> and $< #perldoc perlvar for more information

otherwise, try this:
### this will print out all your %ENV vars... look for 'user' or 'username'
or some such
perl -e "for (sort keys %ENV){print qq($_ => $ENV{$_}\n)}"

hth,
Jos

----- Original Message -----
From: "Nisim, Amit" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 24, 2001 1:21 PM
Subject: How do I get username in Perl ?


>
> Hi All,
>
> I want to get the name of the user that run the script.
> How can I do it ?
>
> Amit
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


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

Reply via email to