in reply to Re^2: weird subroutine behavior
in thread weird subroutine behavior

Excellent! Would you mind posting your updated code?

However, the weird behavior remains,

I assume you mean it remains in the original code, but not in your new version, right?

Replies are listed 'Best First'.
Re^4: weird subroutine behavior
by flaviusm (Acolyte) on Apr 04, 2008 at 14:54 UTC

    Modifications:
    - I commented out the second for loop in the subroutine since it was redundant and overlapping
    - I changed the type of "substrings" from hash to array as you suggested.
    Please see below the modified code:

    Regarding the previous version, the weird behavior remains.