my @rows; open (INFILE, ") { my @fields = split /\|/; push( @rows, td( \@fields ) ); } # while close (INFILE); print table( TR( \@rows ) ); # NOTE: It's TR, not tr, so it doesn't get confused with tr///