Add the following to your script:
use Data::Dumper;
...and then on the line immediately preceding your "for" loop, add, "print Dumper \@array;".
There might be something broken in your input data, and that would be a simple means of identifying (or eliminating) it as a problem.
Dave
In reply to Re^5: Problem with ampersand and regex
by davido
in thread Problem with ampersand and regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |