in reply to RE: RE: RE: RE: any-all
in thread any-all

1. A closure is a sub-routine that generates and returns a subroutine. They are good for playing games with memory and scope. See my Base Conversion Utility for a good example.

2. Writing $a may be nicer then $_[0] but its also more error prone and not properly scoped. $a and $b are also magic variables reserved for sort.

3. Perl does not 'pop a pointer'. It dereferences the array and pops the last value off of it.

Also, I think it is easier to read "while( @A and @B ){ dofunc( pop(@A), pop(@B) ) }" As this keeps you from poping @A until you know that @B still has values.