Then no, it's not correct. The brackets don't match.
Try putting use diagnostics; at the start of your script, if you're having trouble understanding Perl's error messages. This will make the error messages more 'explainy'.
| [reply] [d/l] |
This error means that your file has an unbalanced set of brackets. The code you posted is fine in this regard. Might I suggest making a copy of main.pl and systematically deleting subroutines from the tail of the file until this error goes away, thus identifying the guilty party? | [reply] |
The code you posted is fine in this regard.
Actually, it isn't. The OP's inconsistent indenting is hiding problems in this respect.
update: doh - my eyes crossed due to the terrible layout. sorry, no, the code above does have matching brackets. evidently this problem is elsewhere.
| [reply] |