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