perl 字符串变量内容替换

#!/usr/bin/perl

 

$_ = "he is a great scienceist!";

s/he/they/;

 

print $_;

 

print "\n";

 

my $string = "big exists!";

$string =~ s/big/replacementbig/g;

print "string: $string\n";

 

 

$tt="fff ddd ddfdgfgfdh gff fff dfdshffh";

$tt=~ s/fff/aaa/g;

 

print "\n $tt";

 

 

 

 

 

 

 

 

你可能感兴趣的:(perl)