in reply to
File Truncation Problem
If you are really just trying to match newlines, then why not:
$buf =~ m/(\n*)$/s;
[download]
Further, you don't seem to be using the submatch at all, so you could drop the parens:
$buf =~ m/\n*$/s;
[download]
But I'm just doing this by sight. I haven't tested to be sure.
Comment on
Re: File Truncation Problem
Select
or
Download
Code
In Section
Seekers of Perl Wisdom