... while(<>) { # do stuff print $whatever; } #### $ myscript < inputfile > outputfile