while(<>){ print $fh; #doesn't work print $fh $_; #work }