Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/ ^(.*?) # $1 - start of line up to directive (?: {{ <-- HERE # start of tag (.*?) # $2 - tag contents }} # end of tag ) / at /home/phaidev/work/perl5/lib/x86_64-linux-thread-multi/Template/Parser.pm line 300.