> ps: can anyone explain how (well, why!) the -p11..& tail works? :)

Despite of my poor golf-score (107), I understood this one...

perl -pe'11..&' is the same as:
while(<>){
 11..&;
} continue {
 print;
}

The .. must be understood as the flip-flop operator: eval first part until it 
gets true, then eval second part until it gets true.
When evaluating a test that is a single number, perl compares with line 
number (ie, $.).
So the script tests if $. is equal at 11, when this becomes true (it has 
already printed the 10 first lines), perl tries to evaluate the second part. 
But second part is a call to the 'Main::' subroutine, which does not exist: 
perl crashes.

There is however a problem with this script: it _does_ output something on 
STDERR. What about that, Santa?

Jerome
-- 
[EMAIL PROTECTED]

Reply via email to