in reply to Text in Scripts

Depending on the complexity of your output or the need for consistency over many scripts, you could use one of the templating modules or Perls internal formats. I've found Perls formats to pretty useful for short screen interaction. They give you a fair amount of control and good flexibility.

The problem with formats is that they tend to be specific to the program/script for the most part. I suppose you could share them in a module or package but I've never tried that. However, if the scripts you are converting are self contained, that may not be a limitation.

On the other hand, if you do have several scripts using screen outputs that are substantially the same, you might consider a templating module.

Here is an paired down example of a Perl format that I use now. Just to give you an idea of what it looks like.
sub GenerateRpt{ my $oldouthdl = select; $rtncd = 0; #initialize and gerate various variables here $Text::Wrap::columns = 40; select(STDOUT); # select(OUTFILE); to w +rite to a file $~ = "ERRRPT"; # $FORMAT_NAME $^ = "ERRRPT_TOP"; # $FORMAT_TOP_NAME $= = 81; # $FORMAT_LINES_PER_PAG +E $- = 0; # $FORMAT LINES_LEFT while(<INFILE>){ . # do somethings . . write; } # end while(<INFILE>) close(INFILE); select $oldouthdl; # restore original outp +ut file handle return $rtncd; #*****; format ERRRPT_TOP = @||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +||||||||||| "$title01[$cat]" @||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +||||||||||| "$title02" ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $cathdr[$cat] ~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $cathdr[$cat] ~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $cathdr[$cat] ~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $cathdr[$cat] ~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $cathdr[$cat] ---------------------------------------------------------------------- +----------- . format ERRRPT = Local Case Number: @<<<<<<<<<<<<<<<<<<< Seq: @<<< Crt: @< Ph +ase: @<<<<< $err[4], $err[5], $err[2], + $err[6] Err Number: @<<<<< Rec Number: @<<<<< Field Num +ber: @<<<<< $err[0], $err[1], $obfldnum +97{$err[8]} Field Information: Description: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $line01 ~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $line01 ~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $line01 ---------------------------------------------------------------------- +----------- . } #end GenerateRpt()
Good Lucl PJ

PJ
use strict; use warnings; use diagnostics; (if needed)