viffer has asked for the wisdom of the Perl Monks concerning the following question:
This HAS to be the easiest question ever asked and I apologise in advance.
I have a string "Kev.has.a.stupid.perl.question"
All I want to do is replace the full stops with backslash full stop so that I can pass it into an interpolated pax string.
I have tried
$text =~ s/\./\\./g;
but that gives me
'Kev\\.has\\.a\\.stupid\\.perl\\.question'
If I try
$text =~ s/\./\./g;
It gives me the text string I started with
What I want to end up with is
'Kev\.has\.a\.stupid\.perl\.question'.
It can't be that hard. can it?
Cheers
Kev
|
|---|