if (@ARGV){ print "Command line args\n"; } elsif (! -t STDIN) { print "STDIN\n"; } else { print "Default\n"; }