in reply to Advanced warning handling?

Set a flag when the condition occurs and check for it.

our $SKIP_REST_OF_FILE; sub trap_substr_warning { my $e = $@; if ( $e =~ /whatever/ ) { $SKIP_REST_OF_WARNING = 1; } else { print STDERR $e; } } sub find_process { local $SKIP_REST_OF_FILE = 0; local $SIG{__WARN__} = \ &trap_substr_warning; ... if ( $SKIP_REST_OF_FILE ) { ... } }

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊