[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [Fun With Perl] How to swap $p and $q without $tmp



On Sun, Jun 13, 1999 at 12:28:19AM -0700, Derek Balling wrote:
> At 02:49 AM 6/13/99 -0400, David H. Adler wrote:
> >On Sat, Jun 12, 1999 at 01:06:32AM -0400, mjd-list-fwp@plover.com wrote:
> > > <foghorn>It's a joke, son.</foghorn>
> >
> >s/It's/$1, I say, $1/
> 
> I truly believe you wanted :
> 
> s/(It's)/\1, I say, \1/
> 
> There. Didn't you?
> 
> Or did I miss something in the way regexes work? :)

Nope, I'm just tired.  :-)

> (I'll feel really stupid if I'm wrong, since I sit next to Jeffrey Friedl 
> at work *grin*)

Well, rest easy then.  :-)

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
For the Forth aficionados reading this column, I offer my idea of the
ideal bumper sticker:  "YOU FORTH LOVE IF HONK THEN."
 - Chip Salzenberg, in The Perl Journal #12

==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org