On Jan 29, Eugene van der Pijll said:
>Stephen Turner schreef op 29 januari 2002:
>> Five programs didn't use $. , of which the shortest is this one from Ton
>> Hospel in equal third place:
>>
>> -ln ($a=aeiouy)=~s!!--&~y-!g;eval"\$|$a--c&&print" 50 ton
>>
>> It's another meta-program. The line counting is done by $|-- , although even
>> that isn't obvious until you've worked out what $a is above.
>
>There is more going on than that. Why does Ton use the variable $| ? Any
>other variable doesn't work...
Well, because $| is the magical flip-flop variable, so long as you -- it
and not ++ it.
for (1 .. 6) {
print --$|, "\n";
}
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.