请考虑以下字符串
String = "这是为了测试.我是perl的新手!请帮助.你可以帮忙吗?我希望如此."
在后上面的字符串.或?或!下一个字符应为大写.我怎样才能做到这一点?
我正在逐行读取文本文件,我需要将修改后的数据写入另一个文件.
对你的帮助表示感谢.
考虑一个例子,我想在特定模式匹配时插入几行文本(如果$ line = ~m /这里有几行/然后在下一行插入行):
Run Code Online (Sandbox Code Playgroud)*current file:* "This is my file and i wanna insert few lines in here and other text of the file will continue." *After insertion:* "This is my file and i wanna insert few lines in here this is my new text which i wanted to insert and other text of the file will continue."
这是我的代码:
my $sourcename = $ARGV[1];
my $destname = $ARGV[0];
print $sourcename,"\n";
print $destname,"\n";
my $source_excel = new Spreadsheet::ParseExcel;
my …Run Code Online (Sandbox Code Playgroud) perl ×2