http://www.perlmonks.org?node_id=161098


in reply to Default subroutine parameters

Try this node, it is not short but it will do everything you want fairly easily. Hope it helps... Getting subroutine @_ w/ defaults