in reply to clean formatting

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

Replies are listed 'Best First'.
RE: Re: clean formatting
by clemburg (Curate) on Sep 30, 2000 at 17:29 UTC

    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

RE: Re: clean formatting
by Fastolfe (Vicar) on Sep 29, 2000 at 20:12 UTC
    I agree with jeffa's point here. If you have something simple, printf will probably suffice, but if you're going with multi-line chunks or full nicely formatted e-mails, Perl's format (perlform) abilities will handle this very nicely. You can have formats that span multiple lines, automatically do word wrapping for you, justification, etc. If you're dealing with plain-text data, there are few things more powerful and flexible for you

    It just takes a few minutes to learn.