if( -t and !@ARGV) { die "Need a file or stream on standard input"; }; while (<>) { ... };