Perl print __DATA__ multiple times

Sometimes you have a lot of Data in Perl and you want to store in your script, for that you could you the __DATA__ token, you could simple read it with a file handle:

If you use it more than one time you should seek for the start position:

Output looks like this:

6 thoughts on “Perl print __DATA__ multiple times”

  1. Simply desire to say your article is as surprising.
    The clarity in your put up is simply great and that i can think you’re an expert on this subject.

    Well with your permission allow me to snatch your RSS feed to
    stay updated with imminent post. Thanks one million and please keep up the rewarding

  2. Hey there I am so delighted I found your webpage, I really found you by error, while I was looking
    on Askjeeve for something else, Anyways I am here now and would just
    like to say many thanks for a remarkable post and a all round thrilling blog (I also love the theme/design),
    I don’t have time to browse it all at the minute but I
    have saved it and also included your RSS feeds, so when I have time I will be back to read a lot more,
    Please do keep up the fantastic work.

  3. It is a very good tip especially to the people fresh to
    Perl. Short but very precise info Thank you for sharing this particular one.
    A must read article!

  4. It’s really a cool and helpful component of info. I’m happy
    that you just shared this useful info around. Please stay us informed this way.
    Thanks a lot for sharing.

Leave a Reply to ZolaWFrancia Cancel reply

Your email address will not be published.

13 + 9 =