in reply to Re: Embedding fuction output
in thread Embedding fuction output
"Now whether this increases clarity or adds to the
general confusion..."
Now that's a good question if you ask me. Be aware that the
@{[]} construct allows you to stuff any
code inside the square brackets, be it merely a function
call or a loop or an ugly if..elsif..elsif..else
sequence, or whatever. That's tempting but you're likely to
end up with your whole program consisting of a print
statement,one big here-document, and all the rest of it
scattered here and there in the here-doc.
I would definitely stay with the option of running the code beforehand to feed any local variable, and then use these variables within the here-docs. Or go a step further and use templating solutions like HTML::Template or the Template Toolkit.
--bwana147
|
|---|