lnatz wrote:
Hi, I'm having an issue with here docs, and I'm sure it's something simple that I'm overlooking but it's annoying me. Here is a snippet from my script. sub usageAndDie { print<<EOF; >> The following single-character otions are accepted: >> wih arguments: -T -S >> without arguments(boolean): -g -e >> Use: >> -T followed by a target >> -S followed by a source >> -g to generate a runbook >> -e to execute the runbook >> Requirements: >> you must specify a target and a source >> you must specify either to generate a runbook, execute the runbook or both >> Example: perl exec_rnbk.pl -T UT -S testing -g EOF exit 0; } Its failing with the error: Can't find string terminator "EOF" anywhere before EOF at exec_rnbk.pl line 94. Line 94 is "print<<EOF;". Am I just missing something obvious here?
Have you got any whitespace before or after 'EOF' on the termination line? A trailing space would prevent Perl from recognizing the terminator but be invisible to you. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/