sub forloop { return join "", map{$_[1]->();}(@{$_[0]}) } sub table { "\n".$_[0]."
\n";} sub row { "".$_[0]."\n";} sub cell { "".$_[0]."";} my $data000 = [map{chomp;$_;}()]; print table( forloop $data000 , sub{ row(cell($_)) }, ) __DATA__ one two three four five