List::Compare doesn't necessarily preserve any order. The default behaviour is simply to sort the lists by Perl's default sort order. Without sorting no promise about ordering is given. Keeping original order is what the OP asks for (dispite the title), so List::Compare is unfortunately not a reliable solution.
lodin
In reply to Re^2: tweaking of perldoc function (sorting/preserving order)
by lodin
in thread tweaking of perldoc function (sorting/preserving order)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |