in reply to What is the problem of subroutine "make_file" in my code?

I am still reading through your code, but the first thing i notice is:
my @Motif = split(//,'$origin[$y]'); # This is a loop to get the motif + template from origin8
is probably not doing what you intended. You probably mean the following:
# This is a loop to get the motif template from origin8 my @Motif = split(//,$origin[$y]);
(note the missing single-quotes)

Also it might help if you give us a short bit of the long_sequences.txt so we can run your code.

-enlil