|Think about Loose Coupling|
Can't include a HEREDOC within RHS of a Regexby wind (Priest)
|on Jun 15, 2011 at 00:15 UTC||Need Help??|
wind has asked for the
wisdom of the Perl Monks concerning the following question:
Howdy Fellow Monks,
I recently attempted to include a heredoc within the eval'd rhs of a regex. No matter what I attempted, perl died with the following error:
I've reduced this code to the following example:
Obviously, one can "fix" the issue by using an ordinary string instead, but I would like y'alls advice concerning this.
Super searching revealed only one thread connected to both heredoc's and regex, but it was unrelated.
Update: Anon monk pointed out that it does work when outside of the RHS of the regex: