#!/usr/local/bin/perl
use strict;
use warnings;
use Array::Split qw/split_by/;
my $rows = 5;
my @all_array = <DATA>;
my @sub_array = split_by( $rows, @all_array );
foreach my $index ( 0..$rows - 1 ) {
foreach my $sub ( @sub_array ) {
if ( defined $sub->[$index] ) {
chomp( $sub->[ $index ] );
print $sub->[ $index ],"\t";
}
}
print "\n";
}
__DATA__
0.924
0.609
0.742
0.808
0.832
0.866
0.61
0.584
0.854
0.91
0.863
0.706
0.925
0.719
0.828
0.701
0.761
0.795
0.717
0.7
0.968
0.604
0.751
0.825
0.844
0.863
0.621
0.568
0.876
0.917
没有评论:
发表评论