Map gets it down to 105 chars - yes void maps are good for golf only!
e[$_]%$_)}reverse 1..$#e;print int$e;$e=0}1..@e
# or if you prefer whitespace and no void maps
print int $e;
There was a bug in the code I posted. AFAIK it does not effect the result per se just the efficiency. By trying to scrape a char by using @e instead of $#e (as used in IOs code) within the inner loop we are accessing a non existent element one past the end of the array. As a result @e is growing by one with each inner loop.