cat stuff | perl -ne '$x=shift; print "x=$x\n"; print "<>=$_"' - myarg myarg2 stuff