As far as I understand, all options are optional by default. You can check if they are provided by simply looking if $source_file etc. is undef, and if yes, you can supply your own default value - or die if they are mandatory.

In reply to Re: question about getopt by moritz
in thread question about getopt by Sun751

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":