Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!bu.edu!att!tut.cis.ohio-state.edu!VAX1.CC.UAKRON.EDU!mcs.kent.edu!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.lang.perl Subject: Re: die() exit status and printing $1,$2... in the debugger Message-ID: <1991Jan10.174044.3163@NCoast.ORG> Date: 10 Jan 91 17:40:44 GMT References: <3000@yarra-glen.aaii.oz.au> <10980@jpl-devvax.JPL.NASA.GOV> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) Followup-To: comp.lang.perl Organization: North Coast Computer Resources (ncoast) Lines: 29 As quoted from <10980@jpl-devvax.JPL.NASA.GOV> by lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall): +--------------- | In article <3000@yarra-glen.aaii.oz.au> pem@yarra-glen.aaii.oz.au (Paul E. Maisano) writes: | : % perl -de 0 | : DB<1> "1" =~ /(.)/ | : DB<2> p $1 | : $1 | : DB<3> print $1 | : | : DB<4> | | That's a toughie. Lemme think about it a bit. Perhaps by embedding all | pattern matches in perldb.pl in a sub-block... +--------------- GNU Emacs has (match-data) to save the pattern match information and (store-match-data) to restore it. This is in some ways more flexible than simply using blocks: you can "thread" match runs together (not that that is readable, but sometimes it's the easiest way to do some things). You probably don't want to advertize the contents of the saved match data, however, unless Randal wants to use it in a JAPH really bad.... ;-) ++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