#!perl/bin/perl use strict; print "Are you sure you want to quit ('yes' or any key for 'no'): "; chomp($_ = ); /\byes\b/i ? eval { print "Press any key to exit..."; ; exit; } : eval { print "Thanks, you stayed... But then, goodbye.\n"; print "Press any key to proceed...\n"; ; }; print "GOOD DAY";