while (!eof(STDIN)) {
statements;
}
while (<STDIN>) {
statements;
}
$on_a_tty = -t STDIN && -t STDOUT;
sub prompt { print "yes? " if $on_a_tty }
for ( prompt(); <STDIN>; prompt() ) {
statements;
}
Forward to Avoid Gratuitous Backslashes
Back to Using A Hash Instead of $$name
Up to index
Copyright © 1998, Tom Christiansen
All rights reserved.