$ ./1.initialize.pl $VAR1 = bless( { 'my_github' => { 'email' => 'aldebaran66@gmail.com', 'password' => 'ahDF8w2se' }, 'my_sftp' => { 'base_url' => 'http://www.merrilljohnson.com', 'port' => '22', 'password' => 'gdtRJpN78w', 'domain' => 'home357357.1and1-data.host', 'username' => 'u3738494' } }, 'Config::Tiny' ); created /home/bob/Documents/4.example.ini ----------- $ cat /home/bob/Documents/4.example.ini [my_github] email=aldebaran66@gmail.com password=ahDF8w2se [my_sftp] base_url=http://www.merrilljohnson.com domain=home357357.1and1-data.host password=gdtRJpN78w port=22 username=u3738494 $ ---------- $ cat 1.initialize.pl #!/usr/bin/perl -w ###### ## User: start here. ## The values you will need to populate to create a proper ini file are here. ## Change the ones you need to. You shouldn't have to change any of the ## lexical perl. The most these example data will be is irrelevant. ###### use 5.011; use Data::Dumper; use Path::Tiny; use Config::Tiny; use constant { ENCODING => 'utf8' }; my %config = ( my_sftp => { domain => 'home357357.1and1-data.host', username => 'u3738494', password => 'gdtRJpN78w', port => '22', base_url => 'http://www.merrilljohnson.com', }, my_github => { email => 'aldebaran66@gmail.com', password => 'ahDF8w2se', }, ); 1; my $ini_file = "4.example.ini"; my $ref_config = \%config; my $ini_path = path( "/home/bob/Documents", $ini_file ); my $ini = bless $ref_config, 'Config::Tiny'; say Dumper $ref_config; # this will clobber any previous file of same name $ini->write( $ini_path, ENCODING ); say 'created ', $ini_path; __END__ $