in reply to Escaping special characters
This way you leave the original string untouched and can modify it 20 different ways from tuesday if needed :)use strict; use warnings; my $string = '123!'; my $new_string = $string =~ s/!/4/r; print "original - $string\nreplacement - $new_string";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Escaping special characters
by AnomalousMonk (Archbishop) on Aug 12, 2015 at 02:00 UTC |