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


in reply to Re (tilly) 1: (Golf) Strings-to-Array
in thread (Golf) Strings-to-Array

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):()}

Tilly, I have tested your line as follows
sub r {my$s;$s.=chop for@_;$s?(&r,$s):()} #0 1 2 3 3 #123456789012345678901234567890123 # jeff,john,mary # jjm,eoa,fhr,fny
on v5.6.1-AS628. and it worked fine.

I suppose I am missing something, but I dont see what.
Why are you doing @_=@_ and $s.0??
Is this an issue for an earlier version of perl? As far as I understand these are redundant ops. When does $s.0 evalute in a boolean sense different to $s? And what is the point of assigning @_ to itself?
I am confused.

OTOH it does mean that you can claim 5 less chars, for a total of 33.
:-)
Or am I being a lout?

Yves