in reply to Stream and Atom flexibility
You could do something like
if (@ARGV) { process($_) for @ARGV; } else { while (<>) { process($_); } } [download]