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
In reply to Text in Scripts by monkmoose
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |