my @lines; open(IN1, '<', 'file1') or die $!; while(my $line = ) { chomp $line; push @lines, $line; } close(IN2); open(IN2, '<', 'file2') or die $!; while(my $line = ) { chomp $line; push @lines, $line; } close(IN2); my $size = scalar(@lines); # Get the size of the array