... sub cmd_b_load { my $file = shift; my @files; $file =~ s!::!/!g; # Added this line ... $signal = 1, print $OUT "'$filename' loaded...\n" # if $break_on_load{$filename}; # Replaced this line with the following: if grep $break_on_load{$_}, $filename =~ m{(?:^|[/\\])(?=(.*))}g; ...