Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: A proper name for is_sorted function that can check more than just sorting order?

by ikegami (Patriarch)
on Dec 25, 2017 at 20:42 UTC ( [id://1206173]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1206173]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-19 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found