in reply to Regex problem

If you are actually testing equivalence, it could be both faster and not prone interpolation problems to if you use eq instead of a regex. This also works for substrings if you know placement within the test string.

Replies are listed 'Best First'.
Re^2: Regex problem
by Anonymous Monk on Dec 15, 2008 at 20:22 UTC
    I just tried that and it still doesn't work. Another note is that I have tested what the code outputs for both the $manuCode and $manuID. For each code the id looks identical. What it seems like I'm getting is ASD=ASD for example.
      I threw your code into my editor and threw in use strict. Most looks fine, but the %catReplace hash doesn't get initialized anywhere I can see - would this matter? The other obvious possibility is that you've got whitespace problems. Have you tried seeing if length returns the expected values?
        Thank you all for the help. Was not a coding problem but a converting problem. I now truely hate CSV files. Added a newline break which i got rid of and another unknown character I just used substr to get rid of.