A code is said to be correct when it behaves exactly as specified.
You give no specification to check your code against, use many routines that you don't explain (and that aren't standard Perl builtins), and yet you expect that we can tell you if your code is correct.
Please read the articles I linked to. If you already have (which I doubt from the speed by which you replied), then read them again. If you want an answer, you need to explain your problem in a way that we have a chance to give you an answer. We can't read your mind. |