#!/usr/bin/perl use POSIX qw(isatty); if (isatty(STDIN)) { die("nope. not like that\n"); } while (<>) { print "$_\n"; }