in reply to regex error puzzle
It's actually the next regex that perl is complaining about.
Try changing the second to s/\Q$delete_candidate//; in order to escape the asterisks.
Update: Recounted line numbers... the regex in question is on line 10.
Update 2: Originally thought the error gave the line of the if statement... tye posted a correction while I was posting the first update.
In Section
Seekers of Perl Wisdom