use strict; use warnings; my @result; my $count = 0; for (<"j*.txt">) { open my $fh, "<", $_ or die "Cannot open $_ $!\n"; while(<$fh>){ chomp; $result[$.-1][$count] = $_; } $count++; } for my $line (@result) { print join( ",", map { $_//"" } @$line ), "\n"; }
In reply to Re: arrange output in columns
by hdb
in thread arrange output in columns
by james4545
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |