Type of arg 1 to push must be array (not concatenation (.) or string) at avgshuffle.pl line 36, near "})" Execution of avgshuffle.pl aborted due to compilation errors. #### for (my $x=1; $x<=5; $x++) { open (AA, "shuffle$x"); # LINE A my $Sequence; while () { $Sequence=$_; } close(AA); my %Winenergy = Energy($Sequence,$dinu_r); open (OUT, ">shuffle$x.stb"); # LINE B foreach my $el1(sort{$a <=> $b} keys %Winenergy) { print @energy.$x; push(@energy.$x , $Winenergy{$el1}); #LINE C # print OUT "$el1\t $Winenergy{$el1}\n"; } #print OUT "\n"; close (OUT); } sub Energy { .... } open(FILE,">total_shuffle.stb"); $m=8; for($j=0;$j<$i;$j++) { $avg = ($energy1[$j]+$energy2[$j]+$energy3[$j]+$energy4[$j]+$energy5[$j])/5; print FILE "$m\t$avg\n"; $m++; } close (FILE);