[plug] Introduction and Queries

Colin Muller colin at twobluedots.com.au
Tue Feb 5 15:43:25 WST 2002


On Tue, Feb 05, 2002 at 03:37:46PM +0800, Peter Wright wrote:
> I thought the first 's&&' was using the '&' as a regex (substitution)
> boundary marker, which would mean "substitute nothing with '!msfQ!'"...
> but if so then I can't understand the bit immediately after, ie. '&s'...

Break it down like this:
s&&!msfQ!&
&
s&$&utvK&
&
s&(Q)&\1!sfiupoB&
&
s&^&reverse Ibdlfs&e
&
s&^&#&
&
s&$&#!uojsq&
&
s&(.)&chr(ord($1)-1)&ge
&
s&(.*)&reverse $1&see

Then compare to this (which produces exactly the same result):
s//!msfQ!/
&
s/$/utvK/
&
s/(Q)/\1!sfiupoB/
&
s/^/reverse Ibdlfs/e
&
s/^/#/
&
s/$/#!uojsq/
&
s/(.)/chr(ord($1)-1)/ge
&
s/(.*)/reverse $1/see

Colin



More information about the plug mailing list