use strict; use warnings; open (T1, "t1") or die; my $line; my $flag = 1; my $counter; DATA: while () { print; goto T1; } T1: while () { print; goto DATA; } __END__ file1 file1 file1 file1