in reply to Entering EXIT at any prompt
use strict; use warnings; while(my $input = <STDIN>){ die "User requested exit" if $input eq 'exit'; #do whatever... } [download]