in reply to reading the __DATA__
The only exception can be where you have such strings in a literal multiline string, either quoted or in a here-doc; or when used as a here-doc delimiter. Examples:
resulting in:#!/usr/bin/perl -w print <<'__END__'; This is a here-doc __DATA__ But it's not over yet! __END__ print "This really is the __END__ "; __DATA__ print "See?\n";
I hope this example makes it a bit clear?This is a here-doc __DATA__ But it's not over yet! This really is the __END__
(1) Yes it is legal to do:
Works, too.print <DATA>; __END__ one two
|
|---|