[kw-pm] Last night's meeting

John Macdonald john at perlwolf.com
Fri Jun 19 09:01:18 PDT 2009


On Fri, Jun 19, 2009 at 11:53:51AM -0400, Max wrote:
> John Macdonald wrote:
>> On Fri, Jun 19, 2009 at 11:39:38AM -0400, John Macdonald wrote:
>>   
>>> On Fri, Jun 19, 2009 at 11:29:20AM -0400, John Macdonald wrote:
>>>
>>> $ perl -e 'rand$.<1?$a=$_:1for<>;print$a' <alpha.html
>>>
>>> which is 29 chars.
>>>     
>>
>> And to fill out my original argument against "cheating", if the
>> size of command line switches other than -e is not counted in
>> the rating system, then the solution:
>>
>> $ perl -M'-warnings;rand$.<1?$a=$_:1for<>;print$a' -e '' <alpha.html
>>
>> is a solution with 0 chars.
>>   
>
> I think the idea is that perl -e is free, anything else is counted.  (n,  
> p, -M, etc.)

But does -p count as the 2 chars you type, or the 17 chars:

while(<>){
;print}

that get wrapped around your -e code?


More information about the kw-pm mailing list