in reply to Dynamically create a format definition
Here is a short, seasonal, example that centres the elements of an array on separate lines. The format is built dynamically.
#!/usr/bin/perl -w use strict; my @a = qw(* *** ***** ******* ********* *); formline(('@'.('|'x72)."\n")x@a, @a); print $^A;
--
John.
|
|---|