in reply to Shorten this code

#!/usr/bin/perl -w use strict; $| = 1; my %users; $users{ $_ } = 0 for split "\n", do{ local $/; <DATA> }; { my %in; @in{ split / /, `users` } = (); for( keys %users ) { my $change = exists $in{$_} && !$users{$_} ? do{ $users{$_}++; 'in' } +: !exists $in{$_} && $users{$_} ? do{ $users{$_}--; 'out' } +: (); $change and print localtime() . " $_ has logged $change\n"; } sleep 2; redo; } __DATA__ Fred Wilma Barney Betty

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon