in reply to Can't find EOM before end of file
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 } [download]