Mega Code Archive

 
Categories / Perl / Regular Expression
 

Replace pattern with ()

use strict; use warnings; my $string = "Hello to the world"; print "The original string is: \"$_\"\n"; s(world)(planet); print "s(world)(planet) changes string: $string \n\n";