我正在寻找执行以下操作的正确语法(在Perl,Shell或Ruby中):
# variable to access the data lines appended as a file
END_OF_SCRIPT_MARKER
raw data starts here
and it continues.
答案 0 :(得分:8)
Perl使用__DATA__
执行此操作:
#!/usr/bin/perl
use strict;
use warnings;
while(<DATA>)
{
print;
}
__DATA__
Text to print
goes here