note
haoess
<blockquote><i>
First of all, the DATA filehandle begins after the __DATA__ token, not __END__
</i></blockquote>
That's not always correct. perldoc [doc://perldata] says:
<blockquote><code>
__END__ behaves like __DATA__ in the toplevel script (but
not in files loaded with "require" or "do") and leaves the
remaining contents of the file accessible via "main::DATA".
</code></blockquote>
<code>
$ cat data_eq_end.pl
#!/usr/bin/perl
use warnings;
use strict;
print for <DATA>;
__END__
1
2
3
$ perl data_eq_end.pl
1
2
3
</code>
<p>-- Frank</p>
651848
651862