print "Do you wish to update (Y/N)?\n"; my $choice = q(); while ('y' ne lc $choice and 'n' ne lc $choice) { chomp($choice = <>); }