怎么用perl替换文件中的字符串

2025-04-28 23:03:23
推荐回答(1个)
回答1:

my $s = ''; my $d = '';
open $H, $file;
while (<$H>) {
   tr/$s/$d/;
   print;
}