in reply to Opening file and printing specific data

Try...
print ((getpwnam "username")[0,2]); #$ENV{USER} for example
Check the POD for getpwnam for the list of return values...
Small Update: 0 is the username, 2 is the uid :)
Update2: oki, so this doesn't take ALL the users... use getpwent like Abigail-II showed below

Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.

Replies are listed 'Best First'.
Re: Re: Opening file and printing specific data
by Anonymous Monk on Jun 07, 2002 at 14:32 UTC
    Thank you all for your answers.