RosettaCodeData/Task/Regular-expressions/Perl/regular-expressions-2.pl

4 lines
122 B
Perl
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
$string = "I am a string";
$string =~ s/ a / another /; # makes "I am a string" into "I am another string"
print $string;