OK, in order to even attempt a sensible answer to the
question, we'll need more information.
- Given the presence of the -s we'll need to
know the command line that you use to run the script so we
can know valid values for $matchstr, $g, $r and $y.
- The script seems to closely tied to the syntax of the
input file, so it would be helpful to see some sample
data.
Is that more helpful?
p.s. I still think it's a horrible script :)
--
<
http://www.dave.org.uk>
"The first rule of Perl club is you don't talk about
Perl club."