note
johngg
<p>If you compare the code I gave you and your modified script you will notice that you have lost a couple of very important characters, changing the dereference operator(<c>-></c>) to the subtraction operator (<c>-</c>), i.e.</p>
<code>
my @posns = split m{}, $tests[ $idx ]-[ $subidx ];
$results[ $idx ]-[ $subidx ] ++
</code>
<p>should be</p>
<code>
my @posns = split m{}, $tests[ $idx ]->[ $subidx ];
$results[ $idx ]->[ $subidx ] ++
</code>
<p>With regard to [doc://say], it was introduced with Perl 5.10 so use [doc://print] if your version is earlier. If on 5.10, you have to put <c>use 5.010</c> in your script to access newer features like <c>say</c>. I've not used Perl 5.12 yet so I'm not sure whether the <c>use</c> is necessary there.</p>
<p>You have changed the script to use files but I would recommend that you use the three-argument form of [doc://open], employ lexical filehandles and also check for success, giving the o/s error on failure. Instead of</p>
<code>
open(INFILE1, $FILENAME1);
</code><p>do</p><code>
open my $input1FH, q{<}, $FILENAME1
or die qq{open: < $FILENAME1: $!\n};
</code>
<p>I hope this helps you moveforward.</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-401112">
<p>Cheers,</p><p>JohnGG</p>
</div></div>
863806
864163