#Our Sub sub score { if(defined($oldsection) && $insection ne $oldsection) { undef $oldsection; } elsif (defined($oldsection) && $insection eq $oldsection) { if ($insection ne "pitching") { last if /^([A-Z][A-Z\s]*)/; chomp; @LS = (); push @LS, split('\|',$_); print ""; print "" . $LS[$_] . "" for (1..$#LS); print ""; } } elsif ($insection && !defined($oldsection)) { $oldsection = $insection; next; } $insection = ""; }