in reply to question about getopt

Initialize the source_file with default value before invoking the getOptions function.
my $source_file= "source.txt getopts ("hc:f:o:", \%options); usage() if $options{h}; $source_file= $options{o} if (defined($options{o});