That's actually a solution that could work, but I think it's rather ugly. Not ugly, as in "the code is bad", but it doesn't calculate the best solution which would only be one movement that needs to be done to go from $before to $after. So instead of one operation I'd need to do $#{$before} operations which obviously sucks as soon as the list gets bigger.
Cheers, Flo
In reply to Re^2: Difference between two arrays
by rafl
in thread Difference between two arrays
by rafl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |