in reply to frequency strings 2 files

First of all, you might invest a few minutes in formatting your code, which will make it much easier to follow (even for you). You might want to try out perltidy.

For a step by step guide on doing some simple operations on multiple files, take a look at 976888.

If you are not sure what your program is doing, there are many ways to debug it. Print statements (also take a look at Data::Dumper), the perl debugger (use SuperSearch), ...

Sorry for any bad spelling, broken formatting and missing code examples. During a slight disagreement with my bicycle (which i lost), i broke my left forearm near the elbow. I'm doing the best i can here...