C:>perl my $var = '['; print if /$var/; ^D Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE / at - line 2.