Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!uwm.edu!ogicse!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal L. Schwartz) Newsgroups: comp.lang.perl Subject: Re: Crafty automatic file deletion? Message-ID: <1991Mar28.233515.6433@iwarp.intel.com> Date: 28 Mar 91 23:35:15 GMT References: <126507@uunet.UU.NET> <126658@uunet.UU.NET> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal L. Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 22 In-Reply-To: rbj@uunet.UU.NET (Root Boy Jim) In article <126658@uunet.UU.NET>, rbj@uunet (Root Boy Jim) writes: | There is one thing missing, however; eval looks pretty neat, | but can become complicated in a hurry. I would like the ability | to load code into the script in order to simplify things. Thus: | | find2perl ~ -load maybe_remove.pl -name "*.rm.*.*" \ | -eval '&maybe_remove($file)' | | I'm not clear on whether the current filename is in | $file, $name, or $_. find2perl $HOME -name '*.rm.*.*' -eval '&maybe_remove($name)' | \ (cat maybe-remove.pl - ) | perl (although having a -load would be nicer. :-) print "Just another Perl hacker," -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Intel: putting the 'backward' in 'backward compatible'..."====/