nkpgmartin has asked for the wisdom of the Perl Monks concerning the following question:

when i add:
$log = "/tmp/log \n"; $command = <<eod; ftp $host << eof > $log; user $user password $passwd put $spath[$i] $dpath[$i] bye eof eod
into my script i get the following error: Can't fine string terminator " eod" anywhere before EOF at (eval 1) line 333. where all variables are properly defined. why can't i get eod to work? btw, line 333 is a blank line and there are no problems in that part of the script if i remove the eod/eof stuff.

Replies are listed 'Best First'.
(tye)Re: eod/eof error in perl script
by tye (Sage) on Apr 09, 2001 at 21:22 UTC

    The most likely reason for such a failure is whitespace in the "eod" line.

            - tye (but my friends call me "Tye")
      you're right. thanks a lot!
Answer: eod/eof error in perl script
by nardo (Friar) on Apr 09, 2001 at 21:20 UTC
    That code by itself works fine for me. You could try constructing a minimal program which causes this error, you may discover the problem while making this program, and if not you can post it here and possibly get better answers.