use ConfigIni; #my own wrapper use Getopt::Long; my %config; get_options(\%config); init_config(\%config); #now %config holds all your parameters and they're properly initialized -- the command line overrides anything in the ini file