in reply to Optional parameter before reference

You could also check if your first parameter is a reference using the ref function.

"ref EXPR.... The ref operator returns a true value if EXPR is a reference, false otherwise." (Programming Perl, p.773) It returns the type of thing that the reference refers to (ex. "SCALAR", "ARRAY", "GLOB"...)

LassiLantar

  • Comment on Re: Optional parameter before reference