我只想读取文件中的多行.例如,在sample.txt中
"Hi, how are you?" "Hello I'm fine, thank you!"
现在我的问题是如何在不删除句子中的换行符的情况下阅读第二个语句?
编辑:
似乎我的问题不明确.所以我想我应该编辑一下:在我上面的例子中,我需要得到整体,
"Hello I'm fine, thank you!"
while ($line = <PFILE>)
{
#How can I get the statement to $line?
}
Run Code Online (Sandbox Code Playgroud) perl ×1