Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uwm.edu!psuvax1!news From: flee@cs.psu.edu (Felix Lee) Newsgroups: comp.lang.perl Subject: Re: Sluggish patterns. Message-ID: Date: 7 Apr 91 09:25:45 GMT References: <1991Apr5.194345.10811@uvaarpa.Virginia.EDU> Sender: news@cs.psu.edu (Usenet) Organization: Penn State Computer Science Lines: 14 Nntp-Posting-Host: guardian.cs.psu.edu > local(*cookie, *monster); [...] > eval "sub cookie { &eat() if /$cookie/o; }" > if $cookie ne $old_cookie; Yes, I thought about something like that, but using local to create local versions of subroutines is somewhat frightening. Perl has a nasty habit of dumping core when you play games with references. Someday, I have to try building higher-order functions in Perl. *sin2 = &compose(*sin, *sqr); print &sin2($pi/4); -- Felix Lee flee@cs.psu.edu