in reply to Skript help needed - RegEx & Hashes
open(MERGE,">merge"); #open new file to save the new sortet stuff in
You are doing this inside the foreach loop so each time round the loop the contents of this file get clobbered (ie. erased) on the new call to open. Use append mode instead:
open (MERGE, '>>merge');
Alternatively you could open the file once before starting the foreach loop and close it once after the end. There are pros and cons to both approaches neither of which should probably concern you today.
Let us know if this solves it for you.
|
|---|