in reply to Re: Golf code in perl
in thread Golf code in perl

And for 40:

print<>!~($/=$")+2*map 1..$s{$_%$'}++,<>