in reply to Prototype mismatch: sub main::trim: none vs ($) at

Any other ideas of what may be the cause?

Exactly what the message says, a prototype mismatch

$ perl -Mdiagnostics -e " sub trim(); sub trim($){warn@_} ; " Prototype mismatch: sub main::trim () vs ($) at -e line 1 (#1) (S prototype) The subroutine being declared or defined had previou +sly been declared or defined with a different function prototype.