J�r�me Quelin wrote:
>
> > 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;
> }
yep this is obvious
>
> The .. must be understood as the flip-flop operator: eval first part until it
> gets true, then eval second part until it gets true.
I've read flip-flop operator description in the camel book but...
> When evaluating a test that is a single number, perl compares with line
> number (ie, $.).
which is strange! accordingly to this, the code (for example):
while(<>){ print if 10; }
should print 10th line only ($. == 10) which is not correct...
> 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.
>
so it looks like it is undocumented really, isn't it?
P! Vladi.
--
Vladi Belperchinov-Shabanski <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Personal home page at http://www.biscom.net/~cade
DataMax Ltd. http://www.datamax.bg
Too many hopes and dreams won't see the light...
smime.p7s
Description: S/MIME Cryptographic Signature
