sub spacer { br() x shift }? Like the existing CGI funcs, I'd suggest going with a function that returns a string over directly printing it out. For example, using $q->print(spacer(4)) allows this to move to mod_perl better, supposedly. Or, in my case, I've used CGI to create static pages directly to disk, so being able to print it to an arbitrary file would be handy. | [reply] [d/l] [select] |
shouldn't that be print '<br/>';
xhtml compliant an' all.
Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!
| [reply] [d/l] |
ghenry,
shouldn't that be...
What makes you think it isn't? I could be wrong, but my guess is that br is a function call and not a bareword literall. That function call is likely coming from CGI, which is xhtml compliant (which btw I thought had a space <br />).
| [reply] [d/l] |
Oops.
Regarding br, for backwards-compatibility with browsers that are not XML-enabled, there must be a space before the /> (for example, <br />, not <br/>).
Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!
| [reply] [d/l] [select] |
Looks like the sub should be called liner. I'd expect spacer to look more {" " x shift}ish.
Perl is Huffman encoded by design.
| [reply] |