Rob Dixon wrote:
>> > I'm having problemsdue (i suppose) to the special chars in the
>> > $var1 string the s/// don't match anything.
>> > What can I do to?
>>
>> s{\Q$var1\E}{$var2} is usually what you want, except that may very
>> well 'quote' out the $ in $var.
>
> I guess you mean $var2?
R. Joseph Newton wrote:
> Rob Dixon wrote:
>
> > Hi Scott, Francesco.
> >
> > Scott R. Godin wrote:
> > > Francesco Del Vecchio wrote:
> > >
> > > > suppose this:
> > > > ==
> > > > $string 'I saw Roger and I said :roger? what the @*$!';
> > > >
> > > > $var1 = "
Rob Dixon wrote:
> Hi Scott, Francesco.
>
> Scott R. Godin wrote:
> > Francesco Del Vecchio wrote:
> >
> > > suppose this:
> > > ==
> > > $string 'I saw Roger and I said :roger? what the @*$!';
> > >
> > > $var1 = "roger? what the @*$!";
> > > $var2 = "Hi roger.
Hi Scott, Francesco.
Scott R. Godin wrote:
> Francesco Del Vecchio wrote:
>
> > suppose this:
> > ==
> > $string 'I saw Roger and I said :roger? what the @*$!';
> >
> > $var1 = "roger? what the @*$!";
> > $var2 = "Hi roger...nice to meet you";
> >
> > $string=~
Francesco Del Vecchio wrote:
> suppose this:
> ==
> $string 'I saw Roger and I said :roger? what the @*$!';
>
> $var1 = "roger? what the @*$!";
> $var2 = "Hi roger...nice to meet you";
>
> $string=~ s/$var1/$var2/;
> ===
>
suppose this:
==
$string 'I saw Roger and I said :roger? what the @*$!';
$var1 = "roger? what the @*$!";
$var2 = "Hi roger...nice to meet you";
$string=~ s/$var1/$var2/;
===
I'm having problemsdue (i suppose) to the spec