Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!psuvax1!news From: flee@shire.cs.psu.edu (Felix Lee) Newsgroups: comp.lang.perl Subject: Re: quasi-bug Message-ID: Date: 28 Mar 90 19:44:36 GMT References: <1121@etnibsd.UUCP> <15290@bfmny0.UU.NET> <1990Mar28.180657.22785@iwarp.intel.com> Sender: news@cs.psu.edu (Usenet) Organization: Penn State Computer Science Lines: 14 Randal L. Schwartz wrote: > while ($_ = shift) { > &expression(length ? $_ : shift), next if s/^-e//; > &file(length ? $_ : shift), next if s/^-f//; > # ... > } Okay. That looks pretty usable, if still somewhat frightening. I'll have to remember to use "length" rather than testing strings directly. Note, the while loop should read: while (length($_ = shift)) to handle "0" arguments properly... -- Felix Lee flee@shire.cs.psu.edu *!psuvax1!flee