while ($$buffref =~ s/^(.*)\n//) { print "$1"; }