Perl:在一行开头添加字符

Adr*_*ian 5 regex bash perl

我想在文本文件的每一行的开头添加一个"字符.有没有简单的解决方案?

Aif*_*Aif 6

perl -p -e 's/^/"/' myfile 应该这样做!

$ cat myfile 
0
1
2
3
4
5
6
7
8
9
10
$ perl -p -e 's/^/"/' myfile
"0
"1
"2
"3
"4
"5
"6
"7
"8
"9
"10
Run Code Online (Sandbox Code Playgroud)