MESSAGE
DATE | 2004-11-20 |
FROM | Ruben Safir Secretary NYLXS
|
SUBJECT | Re: [hangout] Perl vs. PHP
|
From owner-hangouts-destenys-at-mrbrklyn.com Sat Nov 20 21:23:28 2004 X-UIDL: V=P"!15R"!HK?"!E90"! Received: from www2.mrbrklyn.com (localhost [127.0.0.1]) by mrbrklyn.com (8.12.11/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id iAL2NSk4003303 for ; Sat, 20 Nov 2004 21:23:28 -0500 Received: (from mdom-at-localhost) by www2.mrbrklyn.com (8.12.11/8.12.3/Submit) id iAL2NR4v003302 for hangouts-destenys; Sat, 20 Nov 2004 21:23:27 -0500 X-Authentication-Warning: www2.mrbrklyn.com: mdom set sender to owner-hangouts-at-www2.mrbrklyn.com using -f Received: from www2.mrbrklyn.com (localhost [127.0.0.1]) by mrbrklyn.com (8.12.11/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id iAL2NR1j003297; Sat, 20 Nov 2004 21:23:27 -0500 Received: (from ruben-at-localhost) by www2.mrbrklyn.com (8.12.11/8.12.3/Submit) id iAL2NQW4003296; Sat, 20 Nov 2004 21:23:26 -0500 Date: Sat, 20 Nov 2004 21:23:26 -0500 From: Ruben Safir Secretary NYLXS To: Billy Cc: ruben-at-mrbrklyn.com, hangout-at-nylxs.com Subject: Re: [hangout] Perl vs. PHP Message-ID: <20041121022326.GA3263-at-www2.mrbrklyn.com> References: <200411192324.13032.sderrick-at-optonline.net> <20041120002945.GA11386-at-www2.mrbrklyn.com> <20041120120315.M12445-at-mrbrklyn.com> <20041120202757.A7940-at-bsd1.nyct.net> <419FF5C4.9060100-at-dadadada.net> <1101003675.30671.4.camel-at-flatbush.mrbrklyn.com> <419FFB7B.4000001-at-dadadada.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <419FFB7B.4000001-at-dadadada.net> User-Agent: Mutt/1.3.27i Sender: owner-hangouts-at-mrbrklyn.com Precedence: bulk Reply-To: Ruben Safir Secretary NYLXS List: New Yorker GNU Linux Scene Admin: To unsubscribe send unsubscribe name-at-domian.com in the body to hangout-request-at-www2.mrbrklyn.com X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on www2.mrbrklyn.com X-Spam-Status: No, score=-5.9 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.0 X-Spam-Level: X-Keywords: X-UID: 39250 Status: RO Content-Length: 1634 Lines: 64
On Sat, Nov 20, 2004 at 09:20:43PM -0500, Billy wrote: > Ruben Safir wrote: > > >>That's my least favorite Perl feature. They give you this as a > >>consolation prize: > >> > >>for($var){ > >> /foo/ and do { stuff; last }; > >> /bar/ and do { barstuff; last }; > >> /bat/ and do { batstuff; last }; > >> /baz/ and do { bazstuff; last }; > >>do { defaultstuff; last }; > >>} > >> > > > >No > > > >sub1 if ($var =~ blah ); > >sub2 if ($var =~ blah2); > >sub3 if (var =~ blah2); > > > > > >And there is a zillion other ways. > > > >Even hook up a sub ref to a hash. > > > that is NOT THE SAME THING! > if $var matches blah and blah2, you're going > to execute sub1, sub2, and sub3. In a switch > statement, you only want ONE of these to happen.
/foo/ and do
IS the same thing it matches off of $_ which is defaulted by the for loop
Ruben
-- __________________________ Brooklyn Linux Solutions
So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://fairuse.nylxs.com
http://www.mrbrklyn.com - Consulting http://www.inns.net <-- Happy Clients http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from around the net http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....
____________________________ NYLXS: New Yorker Free Software Users Scene Fair Use - because it's either fair use or useless.... NYLXS is a trademark of NYLXS, Inc
|
|