$a=<>; #reads one line in from the keyboard including #the newline character (\n) and puts it into $a $b=; #does the same thing only puts it into $b; while(<>){ #reads lines until end of file or a Control-D from the keyboard print "$_"; #prints lines back out }