I spent some time putting together some Perl code for anyone interested.
It’s based on Accept.JS. I’ve included my example sandbox code below.
It’s not complete but should provide the process flow and technique. I’m
sure there’s room for improvement....