in reply to User input at runtime

The Damian CONWWAY's module can help you :
http://search.cpan.org/~dconway/IO-Prompt-v0.99.4/lib/IO/Prompt.pm
#!/usr/bin/perl use strict; use warnings; use IO::Prompt; my $example = "Example"; ( prompt "Enter your choice [y/n] : ", -yes_no ) ? print uc($example), "\n" : print lc($example), "\n";
OUTPUT : Enter your choice [y/n] : y EXAMPLE Enter your choice [y/n] : n example Enter your choice [y/n] : (Please answer 'y' or 'n')
HTH,
PooLpi

Replies are listed 'Best First'.
Re^2: User input at runtime
by andreas1234567 (Vicar) on Dec 13, 2007 at 09:08 UTC