in reply to parsing output of UNIX `who` command

Since it the question is already answered well, I'll answer small.

who|perl -e'$x{(split)[0]}++for(<>);print"$k => $v\n"while($k,$v)=each%x'

Replies are listed 'Best First'.
Re^2: parsing output of UNIX `who` command
by Fletch (Bishop) on Oct 02, 2006 at 12:56 UTC

    Fore.

    perl -le'$x{(split)[0]}++for(`who`);print"$k => $v"while($k,$v)=each%x +'

    Or

    who|perl -lane'$x{$F[0]}++;END{print"$k => $v"while($k,$v)=each%x}'
Re^2: parsing output of UNIX `who` command (golf)
by shmem (Chancellor) on Oct 02, 2006 at 13:13 UTC
    who|perl -nle '/ /,$x{$`}++}{print"@l"while@l=each%x'

    :-)

      who|perl -nle'/ /,$;{$`}++}{print"@l"while@l=each%'
      who|perl -ne'/ /,$;{$`}++}{print$_,$/^="*"for%'
        who|perl -nle'/ /,$;{$`.$&}++}{print each%'
        I downloaded this when it was posted and have been poking my brain at it for a little while. Now my brain hurts.
        Any chance you could break it down for us obfunoobs?