#!/usr/bin/perl -w use strict; # Test to see if $. really does break when reading from DATA. { foreach () { print "Try line $.:$_"; } } __DATA__ This is line 1. This is the second line. Here is line 3. The last line is line 4. #### [alex@foo bar]$ perl -w test2.pl Try line 4:This is line 1. Try line 4:This is the second line. Try line 4:Here is line 3. Try line 4:The last line is line 4. #### [alex@foo bar]$ perl -w test2.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.