How to read the end of a script file as a data file (Perl or any other language)

I am looking for the correct syntax to do the following (in Perl, Shell or Ruby):

# variable to access the data lines appended as a file

END_OF_SCRIPT_MARKER

raw data starts here
and it continues.
+5
source share
1 answer

Perl does this with __DATA__:

#!/usr/bin/perl

use strict;
use warnings;

while(<DATA>)
{
     print;
}

__DATA__
Text to print
goes here
+8
source

All Articles