$tempstring .= $buf; if($tempstring =~ /\n/){ my @temps = split(/\n/,$tempstring); write_lyric("$temps[0] $temps[1]\n"); $tempstring = ''; }