my @rows; while () { my @data; #your routine of choice to split the input into fields #and stash it in @data push @rows, td(\@data); } print table (Tr (\@rows));