in reply to Optional parameter passing to a function??

You would need to pass undef in the missing slots.

prog(1,undef,undef,2,3);

But if you have optional parameters you'll be far better off passing named parameters using a hash.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg