#!/usr/bin/perl -w use strict; my $foo_text; while ( ) { $foo_text .= $_; } print "$foo_text\n"; __DATA__ foo wears foo shoes at the foo store #### #!/usr/bin/perl -w use strict; my $foo_text; { local $/; undef $/; # see perlvar $foot_text = ; # slurps contents after __DATA_ } print "$foo_text\n"; __DATA__ foo wears foo shoes at the foo store