Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
311 B

#!/usr/bin/env perl
use warnings;
use strict;
use 5.10.0;
my $intentionally_broken_regex = '[';
my $compiled_regex;
eval {
$compiled_regex = qr/$intentionally_broken_regex/;
};
if ($@) {
# There should be an error, so let's just quote everything:
$compiled_regex = qr/\Q$intentionally_broken_regex\E/
}