I think you need to look into format. Yes, it can be a pain,
but it can also be very flexible. Since you are wanting
several different formats, you can try:
format = STDOUT; # for good ole standard out
# insert format specifics here
format = EMAIL; # user defined
# insert format specifics here
format = PRINTER; # etc
I would like to be more specific, but I really need more
info to go on, such as an example of what you are trying
to format.
Hope this helps,
Jeff | [reply] [d/l] |
The format features in Perl are really a good thing to go
for, even if they look like stone age compared to
the politically correct OO stuff in common use today.
A good
thing to do is to hide the (ugly) interface to the format
facility behind your own little wrapper functions.
Another thing might be to do a
CPAN search for "format"
and look if you can use any of the modules there.
Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com
| [reply] |
| [reply] |
you probably want to make sure you're using CGI first so you don't hafta worry about the html tags. If you still need formatting, I prefer printf over FORMAT anyday, simply because it's more intuitive (or perhaps because I got used to it in C). printf() is not a deprecated but very useful function. I'm sure other people have opinions on FORMAT, though.
| [reply] |