#Here's what I tried but it doesnt do what I want my($text2) = "test_\1_\2_\3"; my($text3) = q{'$text2'}; print "$text3\n";