S F (via RT) wrote: > # New Ticket Created by S F > # Please include the string: [perl #69614] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=69614 > > > > use Test; > plan 2; > > my @array = (1, 2, 2, 3, 4, 5, 5, 5, 5, 6, 7, 8); > > # this works fine > my Object $cond = [<=] @array; > ok($cond, "array is sorted properly"); > > # this fails > ok([<=] @array, "array is sorted properly");
That's actually a feature, not a bug. [<=] is parsed as a listop, so the description string is actually handed to [<=], not as a separate argument to ok(). The output of your script is: 1..2 ok 1 - array is sorted properly not ok 2 - Usually Test.pm also prints the description for failed tests, so that's an indicator that something went wrong at argument passing or before. Using parenthesis works fine: ok ([<=] @array), "array is sorted properly"; Cheers, Moritz
