http://qs1969.pair.com?node_id=591218


in reply to Adding Default Values [for BEGINNERS]

What follows is a sample construct for asking again instead of using a default.

my $file; for (;;) { print "Which file do you want to open? "; $file = <STDIN>; chomp($file); last if length $file; print "Please supply a file name.\n"; }