cat inputfile | perl mycode.pl > outputfile