in reply to script for deleting html, images and css from server

Just for fun, throwing a few more possible solutions out there:

use warnings; use strict; while (1) { print "Answer: "; chomp( my $answer = <STDIN> ); use Quantum::Superpositions 'any'; # OR #use Perl6::Junction 'any'; warn "not yes 1" unless $answer eq any('y','Y'); warn "not yes 2" unless $answer =~ /^(y|Y)$/; # be a little more flexible: warn "not yes 3" unless $answer =~ /^y(es)?$/i; last if $answer=~/quit|exit/i; }