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"; }
|
---|
In Section
Seekers of Perl Wisdom