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>
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
In reply to Re^2: Debug a sort block
by LanX
in thread Debug a sort block
by rpaskudniak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |