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.
In reply to Re: Dynamically create a format definition
by jmcnamara
in thread Dynamically create a format definition
by tariqahsan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |