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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.