Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!ncar!gatech!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.lang.perl Subject: Re: ftw.pl (was Re: perl find) Message-ID: <1991Mar2.013621.12829@NCoast.ORG> Date: 2 Mar 91 01:36:21 GMT References: <1991Feb21.174657.3357@iwarp.intel.com> <1991Feb26.011953.3017@NCoast.ORG> <11596@jpl-devvax.JPL.NASA.GOV> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) Followup-To: comp.lang.perl Organization: North Coast Public Access Un*x (ncoast) Lines: 24 As quoted from <11596@jpl-devvax.JPL.NASA.GOV> by lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall): +--------------- | In article <1991Feb26.011953.3017@NCoast.ORG> allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) writes: | : Especially in the presence of -o and !? I ended up parsing the arguments into | : a list of predicate lists, then recursively running a predicate evaluator on | : each file and directory found.) | | Why not just translate it to a Perl subroutine and eval that? Recursion, | (), &&, || and ! available for free. +--------------- Doable, but I was in need of a fast solution and the predicate list was actually faster for me to put together. Besides, I can trap a fatal error in one clause, treat it as a fail, and continue. Partial failure is better than complete failure. (The primary case of a fatal error is one of the clauses I added: -eval.) ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY