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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|