in reply to STDIN schizofrenia
#!/usr/bin/perl -w use strict; open(TTY,"+< /dev/tty") or die "Couldn't open tty: $!\n"; print TTY "Are you sure? "; if (my $l = <TTY> !~ /^y/i) { die "Cancelled by user.\n"; } while (<>) { print; } [download]