{ local $_; while(<>){ print; } } # or, while(local $_ = <>) { print; }