in reply to Code Explanation

The repetition operator x, being in list context, creates a list of as many question marks as there are items in @array. join joins them with commas.

This line of code creates a placeholder string for a SQL statement sent to the DBI. It has to have one question mark in the statement for each parameter -- and @array contains them.