http://www.perlmonks.org?node_id=68282


in reply to (Golf) Strings-to-Array

I had to rename the function, but I get 38. It would be shorter, but I added 3 chars to make it run under 5.6, and added 2 more for a bug fix. Plus the obligatory 5 for a private variable.

So if I was a careless lout, I could claim 28, but I am not...

sub r {my$s;$s.=chop for@_=@_;$s.0?(&r,$s):()}

UPDATE
D'oh. MeowChow is right. I need the private variable.