Just another Perl shrine | |
PerlMonks |
use return in regex => allowed or side effects ?by Anonymous Monk |
on Apr 16, 2018 at 08:11 UTC ( [id://1212970]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: Hi Monks Can I use a return statement, leaving the regex and a sub, within a regex, like in the following example ? Or should this not be done because of any side effect ? (like loosing memory ...) I do not see any side effect, but I have not looked intensivly. (Remark: in my program, the sub convert is doing much more and the hash %def has many different strings as keys and vals) Many thanks for your opinion ! program output:
Back to
Seekers of Perl Wisdom
|
|