in reply to Help with getting the ouput from the script
use IO::Prompt::Hooked; my $result = prompt ( message => 'Shall we continue? (yes/no)', default => 'yes', validate => qr/^(?:yes|no)$/i, error => "The only two options are 'yes' or 'no'. Try again.\n", ); if ( $result =~ m/^no$/i ) { print "Ok, we're done.\n"; exit( 0 ); } print "Great... let's continue...\n";
I'm wondering, if you're having trouble taking user input and branching your logic, who wrote the part of your script that's working great?
Dave
|
|---|