Amoe has asked for the wisdom of the Perl Monks concerning the following question:
That fails with "Can't find string terminator "HELP" anywhere before EOF". However, if I modify the code to this:sub help { print <<HELP; The help information goes here! HELP die(); }
Everything goes fine. But that's really ugly. So are HERE docs compatible with indentation? How do I stop getting the error and keep my code pretty at the same time? Any help from you wise monks would be greatly appreciated. (BTW, I can't seem to find the documentation for HERE docs, so any pointers would be nice there too.)sub help { print <<HELP; The help information goes here! HELP die(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trubs with HERE docs
by stefan k (Curate) on Sep 05, 2001 at 15:47 UTC | |
by Hofmator (Curate) on Sep 05, 2001 at 16:11 UTC | |
|
Re: Trubs with HERE docs
by Masem (Monsignor) on Sep 05, 2001 at 15:50 UTC | |
by tachyon (Chancellor) on Sep 05, 2001 at 17:39 UTC | |
by extremely (Priest) on Sep 05, 2001 at 20:35 UTC | |
|
Re: Trubs with HERE docs
by dondelelcaro (Monk) on Sep 05, 2001 at 15:54 UTC | |
|
Re: Trubs with HERE docs
by George_Sherston (Vicar) on Sep 05, 2001 at 16:36 UTC | |
by herveus (Prior) on Sep 05, 2001 at 16:56 UTC | |
|
Re: Trubs with HERE docs
by Amoe (Friar) on Sep 05, 2001 at 16:06 UTC |