Keep in mind that since the second 'e' causes the content of $str_regexp to be executed as Perl code, it would be dangerous to accept $str_regexp from a remote source such as a web page form. For example, consider what would happen if someone passed "system('rm -rf /')".