in reply to Building strings of specific length
Trying to guess at the bigger picture, you might also be interested in sprintf
printf("[%5d]\n", 123); # Prints [ 123]
and Perl6::Form (it brings Perl 6's forms to Perl 5).
use Perl6::Form; print form " =================================== ", "| NAME | AGE | ID NUMBER |", "|----------+------------+-----------|", "| {<<<<<<} | {||||||||} | {>>>>>>>} |", $name, $age, $ID, "|===================================|", "| COMMENTS |", "|-----------------------------------|", "| {[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[} |", $comments, " =================================== ";
|
|---|