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

The current poll is about the most annoying way to include literals into your perl script. I know (how to use) all of them, except for 'there docs'.

I've got a couple of questions about them:
- What are they?
- How do you use them?
- What are the differences with here docs?

Besides that, I was wondering why -in general- people are tended to discourage the usage of here docs.
  • Comment on here doc and there doc: what's the difference? why does everyone seem to hate them?

Replies are listed 'Best First'.
Re: here doc and there doc: what's the difference? why does everyone seem to hate them?
by Anonymous Monk on Jun 19, 2004 at 13:15 UTC
Re: here doc and there doc: what's the difference? why does everyone seem to hate them?
by PodMaster (Abbot) on Jun 19, 2004 at 13:10 UTC
      Hmm... your reply is mainly about the here docs, where as my original post was mainly about there (here, there) docs.
      That's why you don't understood my question :)

      But I already got the answer (see below)

      update: or maybe not... help! It's getting real confusing now! :)
        I see (on the points I missed). Well, I don't like source filters The following works for me (:
        print <<' INDENTED_'; blah blah blah blah bla INDENTED_

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

        FYI, the 'there docs' linked to in that node that has your "answer" have littlle to do with the 'there docs' in the poll.

        - tye