[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [Fun With Perl]



At 19:49 -0400 6/11/99, Bernie Cosell wrote:
> On the snippet you posted yesterday [the one with the readdir loop with
> the odd '/.+/' in it that of course should have been a '/^\./'] i was
> wondering: when I looked at that code, the very first thing I saw was
> what to me was the obvious typo: the '>' which seemed obviously and
> blatantly wrong [and hence my comment about the unix "rm -r * ~'
> problem].
>
> I've exchanged email with other folk who *ONLY* saw the RE problem: I
> shudder to think that they would've actually fixed the RE and then *RUN*
> the thing...  And so I'm wondering: what did you intend as the 'oops'??
> To me, an open that clobbers every file is a lot bigger oops than an RE
> that actually saves your behind [since it matches everything and saves
> you from trashing the directory].

My, my...

I never even saw that one (not my code :-)

My _guess_ is that this was a "real" typo (i.e. the author came into my
office and wrote the code on the whiteboard and I copied it from there.

But yes, certainly, if the > was in the original it would run _even faster_
(and once :( after the pattern was fixed.

rm -r * .o

- V.
-- --
       |\      _,,,---,,_       Vicki Brown <vlb@cfcl.com>
 ZZZzz /,`.-'`'    -.  ;-;;,_   Journeyman Sourceror: Scripts & Philtres
      |,4-  ) )-,_. ,\ (  `'-'  P.O. Box 1269  San Bruno  CA  94066
     '---''(_/--'  `-'\_) http://www.cfcl.com/~vlb  http://www.macperl.org

==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org