Another possibility is to treat the replacement as an expression and
single quote it:

   s/#4/'Blah hash $288'/gie

Notice the additional regex modifier 'e' on the end. It should work
and might be more understandable (you judge).

Good luck,

Troy


>>> Thomas Eibner <thomas at stderr.net> 06/20/01 03:50AM >>>
On Wed, Jun 20, 2001 at 03:46:31AM -0500, Bob Tanner wrote:
> Quoting Thomas Eibner (thomas at stderr.net): 
> > On Wed, Jun 20, 2001 at 03:26:52AM -0500, Bob Tanner wrote:
> > > Quoting Bob Tanner (tanner at real-time.com): 
> > > > s/#4/Blah hash $288/gi
> > > I guess a better question what is a quick and easy was to escape all
> > > meta-characters in a string?
> > > Like, if I want to escape * ? $ 
>       quotemeta EXPR
>$ perl
>$test = quotemeta '*?$-';
>print $test, "\n";^D
>\*\?\$\-