in reply to Dreaming of Post Interpolation
my $text = q{ Dear $person, I know that this text is $adjective. But I wish it could be... }; my %replace = (person => 'Mom', adjective => 'not interpolated'); $text =~ s/\$(\w+)/$replace{$1}/g; print $text;
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Re: Dreaming of Post Interpolation
by BBQ (Curate) on May 30, 2000 at 04:24 UTC | |
by takshaka (Friar) on May 30, 2000 at 04:54 UTC | |
by BBQ (Curate) on May 30, 2000 at 06:23 UTC |