#!/usr/bin/perl use warnings; use strict; my @row; my @f_map = ('f1', 'f2'); my $f = "format = \n" . ('^' . '<' x 15 . '|') x scalar(@f_map) . "\n" . '@row' . "\n" . ('^' . '<' x 15 . '|') x scalar(@f_map) . "~~\n" . '@row' . "\n" . ".\n"; eval($f); # @row = ('blah1' x 10, 'blah2' x 10); write;