monkmoose has asked for the wisdom of the Perl Monks concerning the following question:
Wisdom escapes me...as I have only just begun.
The scenario:
Got asked by my boss to translate a bunch of scripts form bash to PERL. Not a bad idea...only...the scripts are a nightmare and the program tree really could use some major pruning...we are talking a jungle being pruned back to a rosebush.
The main question I have:
I have reviewed a very poor style of inserting/formatting text within a bash script. It appears that several functions were made containing formatted text. These functions are then called when convenient to print the formated text on screen. (interactive shell scripts).
In trying to translate to PERL, I find this method inefficient, but I have not figured out a better way in PERL of doing the same...and by formatted I imply blank lines and tabbing. (not bold, italics, etc...).
The question:
Is there a lazy way, err...more wise way to output blocks of text to the stdout other than putting a block as a subroutine and calling subroutines in order as a means to "create" a pretty text readout on screen? I'd really like to utilize the same text with pod as well...so I can create help files as well as print the text on the screen when the script is run.
Any insight available is appreciated and elaboration upon request is possible.
Thank you,
-monkmoose
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Text in Scripts
by hardburn (Abbot) on Aug 30, 2004 at 21:11 UTC | |
Re: Text in Scripts
by Plankton (Vicar) on Aug 30, 2004 at 21:12 UTC | |
Re: Text in Scripts
by eieio (Pilgrim) on Aug 30, 2004 at 21:16 UTC | |
Re: Text in Scripts
by periapt (Hermit) on Aug 31, 2004 at 12:34 UTC | |
Re: Text in Scripts
by revdiablo (Prior) on Aug 31, 2004 at 16:56 UTC |