in reply to Re^2: Check if sort has changed order
in thread Check if sort has changed order

You can apply array_diff function on the sorted and unsorted file and check the output file to see weather sort had done any modification or not.

Replies are listed 'Best First'.
Re^4: Check if sort has changed order
by LanX (Saint) on May 10, 2013 at 13:05 UTC
    > You can apply array_diff function on the sorted and unsorted file and check the output file to see weather sort had done any modification or not.

    Unlikely, please demonstrate an example of how you intend to do it with Array::Utils

    I mean real code!

    Cheers Rolf

    ( addicted to the Perl Programming Language)

    update

    as expected, pure nonsense!

    DB<110> use Array::Utils qw(:all) DB<111> @a = (8..12); @b = sort @a; @c = (@b,42) => (10, 11, 12, 8, 9, 42) DB<112> array_diff @a,@b DB<113> array_diff @a,@c => 42