#!/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; }
In reply to Re: STDIN schizofrenia
by sgifford
in thread STDIN schizofrenia
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |