in reply to Multiple file reading

Are those 1s and 0s bits or are they just characters? If the latter, you could just read one byte at a time from each file, then write them out:
open FH1, "what.txt" or die $!; open FH2, "what1.txt" or die $!; my($buf1, $buf2, $total); while (read(FH1, $buf1, 1) && read(FH2, $buf2, 1)) { $total .= $buf1 . $buf2; } close FH1; close FH2;
Of course, you'd get faster results by reading in 1000 bytes or so at a time, then grabbing the first byte of each buffer. That would cut down on disk operations.