in reply to Type of arg 1 to shift must be array (not sort)

I think splice is what you're looking for:
if ($array->[$_] == $number) { splice(@$array, $_, 1); }

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^2: Type of arg 1 to shift must be array (not sort)
by Fletch (Bishop) on Dec 15, 2005 at 21:51 UTC

    But be careful using splice on any part of a LIST that you're iterating over with foreach.

    If any part of LIST is an array, foreach will get very confused if you add or remove elements within the loop body, for example with splice. So don't do that.