in reply to Re: Keeping track of Pairs
in thread Keeping track of Pairs

How about this to replace your loop (though destroying the hand may not be a good idea in the long run):

$hand =~ s/((.)\2*)/length $1/ge

Update: Removed useless brackets

--
I'd like to be able to assign to an luser