If that is the case, here's another 'solution':
our $ESC_EXIT_LABEL; sub my_prompt { my $input = prompt @_, -escape if ($input eq "\e" && $ESC_EXIT_LABEL) { goto $ESC_EXIT_LABEL; } return $input; } sub enter_products { ... local($ESC_EXIT_LABEL) = "enter_products_esc_label"; while (1) { ... call my_prompt many times... } enter_products_esc_label: write_database(...); }
In reply to Re: Custom interrupt?
by pc88mxer
in thread Custom interrupt?
by azredwing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |