If you add print "@_"; to the top of your sub, you'll see the problem.
Even when @less, @great and $pivot are empty, you still recurse.
Changing your first line to: my $pivot=pop // return; will allow the recursion to terminate.
In reply to Re: Quicksort problem
by BrowserUk
in thread Quicksort problem
by JediMasterT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |