in reply to Re: A proper name for is_sorted function that can check more than just sorting order?
in thread A proper name for is_sorted function that can check more than just sorting order?

Or you could actually use all.

all { $res[$_ - 1]{end_date} eq $res[$_]{start_date} } 1 .. $#res

Or if you want to know which ones are "bad" so you can output a message for each of them:

map { $res[$_ - 1] } grep { $res[$_ - 1]{end_date} ne $res[$_]{start_date} } 1..$#res
  • Comment on Re^2: A proper name for is_sorted function that can check more than just sorting order?
  • Select or Download Code