Next | Program Repair Shop | 251 |
I originally decided to use the offset approach:
$chain[$1 - 1] = cleanup($_);
Preferring to get rid of it sooner rather than later
But the test audiences persuaded me that this one was better:
for (@chain) { next unless defined; $_->[$i] =~ s/0/L/g; $_->[$i] =~ s/1/H/g; }
Under the Say What You Mean doctrine:
Chain 1 is now in $chain[1]
Also, it is more robust if it ever happens that we have a chain 4 but no chain 3
This is extract3.pl
Next | Copyright © 2002 M. J. Dominus |