Àðòåì Àâåòèñÿí <> wrote:

: use strict;
: my $str = 'lazha';
: my $pattern = 'la(zh)(a)';
: my $replacement = '$1o"p$2';
: $str =~ s/$pattern/$replacement/;
: print $str;
: __END__
:
: I want
:
: zho"pa

my $replacement = "$1o\"p$2";

    # or:

my $replacement = qq($1o"p$2); # You can read more about qq() in perlop.


: More generally, I want to know if there is a way to interpolate
: variables in a single quoted string

    No.


HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328

 . . . With Liberty and Justice for all (heterosexuals).


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to