in reply to file duplication error
This really has nothing to do with the problem at hand but I just wanted to add an observation.
Always check the return value of open() and react accordingly:open (fileReadWrite,"../Rules1.txt");
You are reading the entire file into memory here:open(FILEREADWRITE, "../Rules1.txt") || die "Could not open Rules1.txt + - $!\n";
Which is ok for small files but might bite you if you try that with huge files.my @dataRead = <fileReadWrite>;
|
|---|