It is true that Perl protects you by default against arbitrary code execution in regular expressions. However, it does not protect you against denial of service, because a regular expression may be crafted not to finish before the heat death of the universe. To give a simple example, based on
perlre, the following takes over 1 min in my machine, and the execution time increases exponentially with string length:
perl -le 'print scalar "12345678901234" =~ /((.{0,5}){0,5}){0,5}[\0]/'