$ cat x.pl #!/usr/bin/perl -w use strict; # Test to see if $. really does break when reading from DATA. { #foreach () { print "Try line $.:$_"; } while() { print "Try line $.:$_"; } } __DATA__ This is line 1. This is the second line. Here is line 3. The last line is line 4.$ perl ./x.pl Try line 1:This is line 1. Try line 2:This is the second line. Try line 3:Here is line 3. Try line 4:The last line is line 4.$