in reply to Running a Sub for a Text File

Just a word of advice.. in your code you do...
if ($linescore eq 0){ linescore($y, $l); $y = $x; } if ($linescore ne 0){
ne and eq and gt and lt and cmp (and others) are designed for comparing strings... and though it probably won't hurt you here, you probably want to get in the habit of using == and != when comparing numbers instead of strings. Otherwise you may have problems if you have:
$_ = '02'; print "equal\n" if $_ eq 2;
because 02 as a string is not equal to 2 as a string...
I know it has bit me before.
                - Ant