Walker Emile wrote:
Hello List:

Hello,

I'm new to Perl so be gentle.  I'm looking for a quick function or
routine that given a list of user names on a system (possibly from
/etc/passwd entries),

perldoc -f setpwent
perldoc -f getpwent
perldoc -f endpwent
perldoc -f getpwnam
perldoc -f getpwuid


will:
(1)     obtain each user's last login date

http://search.cpan.org/~mpiotr/User-Utmp-1.8/Utmp.pm


(2)     parse and append this information into 5 separate list variables

Perl doesn't have "list variables", just scalars, arrays and hashes.

Probably better to use a single hash of arrays or hash of hashes etc.

perldoc perldsc
perldoc perllol


(i.e. group1, group2, etc).

The overall objective here is to check for dormant accounts, grouping
accounts according to the last dates they were logged into and then
producing a report.  Thanks.

Good luck with that.  Ask here if you need any more help.



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to