in reply to function(function(noFunction?))
and you want to be able to say:foreach $message (@logmessages) { LI(); Strong($message); }
Is that correct?foreach $message (@logmessages) { LI(Strong($message)); }
If so, what you need to do is modify your "Strong" sub so that it *returns* the HTML rather than printing it out.
In other words:
Now you can saysub Strong { return "<STRONG>" . $_[0] . "</STRONG>"; }
and it should work.LI(Strong($message));
Is that what you were asking? (Of course, if you're going to do this, you *may* want to think about making all of your functions return the HTML rather than printing it, to be consistent.)
|
|---|