开发者

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

开发者 https://www.devze.com 2023-03-19 01:15 出处:网络
I am looking for the correct syntax of开发者_运维问答 doing the following (in Perl, Shell or Ruby):

I am looking for the correct syntax of开发者_运维问答 doing 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.


Perl does this with __DATA__:

#!/usr/bin/perl

use strict;
use warnings;

while(<DATA>)
{
     print;
}

__DATA__
Text to print
goes here
0

精彩评论

暂无评论...
验证码 换一张
取 消