my $color = "red"; my $fruit = "apple"; my $name = "chromatic"; my $string = 'Hi, my name is $name. Please hand me a $color $fruit.'; print ">>$string<<\n"; # demonstrate what we have my $s2; eval "\$s2 = qq/$string/"; # the real magic print "->$s2<-\n"; # demonstrate the result