in reply to Re: Re: 'split'-ting headache
in thread 'split'-ting headache
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.use strict; use Data::Dumper; while (my $line = <FILE>) { chomp ($line); #$line =~ s/^\s*//; my @array = split(/\s+/,$line,16); print Dumper \@array; }
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)
|
|---|