my @aoa = ( [qw (GAL_up800.fasta 6 800 4.8)], [qw (hm01g.fasta 18 2008 36.144)], [qw (hm02r.fasta 9 1000 9)], [qw (train_muscle.fasta 7 50 0.35 )], ); my $aref; # Variable must be visible to the format format STDOUT = @<<<<<<<<<<<<<<<<<<<<<< @<<<<<< @<<<<<< @<<<<<< @$aref . foreach $aref (@aoa) { write; }