use Data::Dumper; my $conf = ( foo => 'foofoo', bar => 'barbar', ); open CONF,"myconfig.conf"; print CONF Dumper($conf); close CONF;