I wish i had more time to go over this with you, but right off the bat:
is wrong. That is an array that holds an empty array reference. Try this instead:my @subjects = []; # reference to empty array
There is no need to assign anything, just declare the variable. Further more, this loop:my @subjects;
can be written in a more Perlish fashion like so:for (my $i = 0 ; $i<scalar @resultLine; $i++) {
This is Perl, not C. :) Finally, do yourself a big favor. Slow down and read some material. I recommend davorg's excellent book, Data Munging With Perl.for my $i (0 .. $#resultLine) {
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)
In reply to Re: RegExpression fails to work
by jeffa
in thread RegExpression fails to work
by MonkPaul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |