Xref: utzoo alt.sources:1844 comp.unix.questions:21991 comp.lang.perl:1256 Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!apple!mrspoc!kayvan From: kayvan@mrspoc.Transact.COM (Kayvan Sylvan) Newsgroups: alt.sources,comp.unix.questions,comp.lang.perl Subject: Re: A Perl version of "wall" Message-ID: Date: 5 May 90 07:36:34 GMT References: <264186E0.17B3@tct.uucp> Sender: kayvan@mrspoc.Transact.COM (Kayvan Sylvan) Organization: Transact Software, Inc., Los Altos, CA Lines: 22 In-reply-to: chip@tct.uucp's message of 4 May 90 13:42:56 GMT In article <264186E0.17B3@tct.uucp> chip@tct.uucp (Chip Salzenberg) writes: [... a rather nice version of wall ...] $_ = `who am i 2>/dev/null`; chop; ($me) = split; $me = "Somebody" unless $me; Instead of the above, I would do: ($me = getlogin) || (($me) = getpwuid($<)) || ($me = "Somebody"); No extra process. ---Kayvan -- | Kayvan Sylvan @ Transact Software, Inc. -*- Los Altos, CA (415) 961-6112 | | Internet: kayvan@{mrspoc.Transact.com, eris.berkeley.edu, largo.ig.com} | | UUCP: ...!{apple,pyramid,bionet,mips}!mrspoc!kayvan "Imagine Cute Saying" |