Help for this page
if ($buf =~ s/(.*\n)//) { # line is in $1 my $line = $1; ...process $line here... }