Split perl version logic into if/else block - #279

Split the special perl logic/handling for 5.1/5.10 and 5.2/5.20 into a
multi-line if/elsif/else block for better readability.

(this was requested by @joshk)