fileinput: http://t.co/cRh1rl1evR lets you iterate over files as command line arguments, or stdin. Handy, just does the right thing.