So I hit this issue every so often. I wanted to see if I am coding something incorrectly or if I just should continue to use my workaround.
I use Perl TPLs often and use $rootnode->value('foo'), but when I use something like
$output .= {
some HTML $rootnode->value('foo')
even more HTML
};
then I ostream $output
However when I code like this, instead of getting the value of foo, I get TeamSite::XMLnode=Array(0x0123456)->value('foo')
displayed on my page.
Then I kick myself and change the code to:
$foo = $rootnode->value('foo');
$output .= {
some HTML $foo
even more HTML
};
and it works.
So I am curious, should what I am trying work ? Do I need to quote it or parens or brackets or anything ? Or should I just try to remember the workaround ?