diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-11-09 13:38:50 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-11-09 13:38:50 +0000 |
commit | 34de22dd6ede167a09e3a3ee571665ba2c647f94 (patch) | |
tree | b23f3936caa4bcd96a5213e5fca656b7c4465195 /eg | |
parent | 57ebbfd03f7f6ea2523a79a595ecc80ef8e2ab9b (diff) | |
download | perl-34de22dd6ede167a09e3a3ee571665ba2c647f94.tar.gz |
perl 3.0 patch #40 patch #38, continued
See patch #38.
Diffstat (limited to 'eg')
-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; |