in reply to Can anyone figure this out?

It turns out that this is as simple as it sounds. s///g returns the number of matches found. The replacement in the substitution here is entirely irrelevant, as are the three /e modifiers.

The subroutine could be rewritten as:

sub { $_ = pop; s/\d//g; }
It took me a little while to figure it out, though. :)