Then what you need to do is inspect your data. I was
working on similar problem recently and finally noticed
that i had a few records with
trailing leading* space - that is, a
space or two before any data. Use Data::Dumper to inspect
your arrays (and use strict!):
use strict;
use Data::Dumper;
while (my $line = <FILE>)
{
chomp ($line);
#$line =~ s/^\s*//;
my @array = split(/\s+/,$line,16);
print Dumper \@array;
}
Also, notice that i used the third argument for split -
LIMIT. Since you know that you need 16 elements, explicitly
let Perl know. If you do find that trailing space is the
culprit, you can uncomment the commented line from above.
Good luck!
* thanks particle ;)
jeffa
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
| [reply] [d/l] |