woah...

why is $bar = "\${foo}" - ? something is weird there...

also the problem was with your substitution op

$bar =~ s/\$\{\(\w+)\}/\$${1}/g;

                                - John

On Mon, 29 Jul 2002, Balint, Jess wrote:

> Thanks. Here is what I am trying to accomplish:
> 
> $foo = "something";
> $bar = "\${foo}";
> $bar =~ s/\$\{\(\w+)\}/$$1/g;
> print $bar;
> 
> OUTPUT:
> 
> something
> 
> I am getting an error:
> 
> Can't use string ("something") as a SCALAR ref while "strict refs" in use at
> .. . .
> Thanks.
> 
> Jess
> 
> -----Original Message-----
> From: John Francis
> To: Balint, Jess
> Cc: '[EMAIL PROTECTED]'
> Sent: 7/28/02 10:14 PM
> Subject: Re: Regex Problem
> 
> Jess,
>      Try:
>       s/\$\{(\w+)\}/\$${1}/g;
> 
>      if i understood your problem correctly =)
>                       - John
> 
> On Sun, 28 Jul 2002, Balint, Jess wrote:
> 
> > Hello all. I am getting an error with the following reg-exp:
> > 
> >     s/\$\{(\w+)\}/$$1/g;
> > 
> > I am not sure exactly how to do this type of thing. Is there any way
> to get
> > around the error or must I turn off 'strict refs' for this line??
> Thanks
> > alot.
> > 
> > Jess
> > 
> > -- 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to