in reply to Eval in RegEx ...

Greetings.

Well, that's simple enough. Simply change

my $html =<<'HTML'; <div> <p>Code</p> <?perl print "<b>Hello World</b>"; ?> </div> HTML
into
my $html =<<'HTML'; <div> <p>Code</p> <?perl print " <b>Hello World</b>"; ?> </div> HTML
Done. :)

Best wishes.

--Chris

Hey. I'm not completely useless. I can be used as a bad example.

Replies are listed 'Best First'.
Re^2: Eval in RegEx ...
by thakares (Acolyte) on Dec 06, 2013 at 15:51 UTC
    Nope... thanks anyway...
      Odd. I'ts simple heredoc notation/quoting. I use it all the time. I tried it here, before posting the reply, and it worked. Must be more elements involved, than you are providing, that process the format of the output.

      Sorry.

      --Chris

      Hey. I'm not completely useless. I can be used as a bad example.
      

        Chris,

        Its not a problem of heredoc, the problem with evaluation of perl code.

        Also I didn't understant what you've changed than a addition space just after a quotation mark.

        Anyway I found solution after some trial with eval!

        Thanks Chris