for (1..3) { while(local $_=) { print; #Prints whatever was typed } print; # print 1, 2, 3 }