for ($i=1; $i<=3; $i++) { open $input1, '<', "$path\/File-$molec1-cluster$i.out" or die $!; push @ARGV, "$path\/File-$molec1-cluster$i.out"; for ($j=2; $j<=3; $j++) { open $input2, '<', "$path\/File-$molec2-cluster$j.out" or die $!; push @ARGV, "$path\/File-$molec2-cluster$j.out";