in reply to Entering EXIT at any prompt

Without some code, this is only a guess at what you're asking....
use strict; use warnings; while(my $input = <STDIN>){ die "User requested exit" if $input eq 'exit'; #do whatever... }