- or download this
$ perl -Mstrict -w -e'while(1){ chomp( my $i = <STDIN>); $i eq "yes" &
+& print "yes" && last; $i eq "no" && print "no" && last }'
- or download this
#!/usr/bin/perl -w
use strict;
...
if( $i eq 'yes' ) { print "Yes entered for system.\n"; last }
if( $i eq 'no' ) { print "No entered for system.\n"; last }
}
- or download this
my $response = qr/^(yes|no)$/;
while( chomp( $_ = <STDIN> ) )
{
/$response/ and print "$1 entered for system.$/" and last
}