diff options
Diffstat (limited to 'eg/who')
-rw-r--r-- | eg/who | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,8 +1,8 @@ #!/usr/bin/perl # This assumes your /etc/utmp file looks like ours -open(utmp,'/etc/utmp'); -@mo = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); -while (read(utmp,$utmp,36)) { +open(UTMP,'/etc/utmp'); +@mo = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec); +while (read(UTMP,$utmp,36)) { ($line,$name,$host,$time) = unpack('A8A8A16l',$utmp); if ($name) { $host = "($host)" if $host; |