in reply to Re: Debug a sort block
in thread Debug a sort block

> Update: It is possible (though usually very tedious) to put debug statements into a sort block

In this case I'd rather replace the sort block with a function, it's match easier to set breakpoints and watch expressions then.

DB<1> sub by_num { return $a <=> $b } DB<2> x [sort by_num 1,11,2,12] 0 ARRAY(0x334b888) 0 1 1 2 2 11 3 12 DB<3>

update

added return to make mechanism obvious.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice