in reply to Re^2: Multiple Key Problem help
in thread Multiple Key Problem help

There was a formatting error in u671296's code. The line $positions{$key} = $pos; should read $positions{$key} = [$pos];, in order to create an array reference. Then the push in the else branch will have an array reference to push into, rather than just a scalar number.

Replies are listed 'Best First'.
Re^4: Multiple Key Problem help
by Anonymous Monk on Dec 24, 2008 at 16:51 UTC
    I wonder why the square brackets disappeared ? Perhaps because I possibly didn't put the code in a c tag ?
A reply falls below the community's threshold of quality. You may see it by logging in.