Make sure you have no whitespace before or after the EOM, and make sure that there's a "\n" after the EOM.
If you really, really want to indent the EOM, use
{ print <<' EOM'; ... whatever ... EOM }
In reply to Re: help help!! simple bug
by dws
in thread Can't find EOM before end of file
by newatperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |