#!/usr/bin/perl -w use strict; use Config::Tiny; use Data::Dumper; my $Config = Config::Tiny->read( 'configfile.txt') or die " $!"; # $Months here is a ref to a hash # my $Months = $Config->{Months}; print Dumper \$Months; =prints $VAR1 = \{ 'Month1' => 'January', 'Month2' => 'February' }; =cut __END__ #file configfile.txt contains this comment and this data #Sample Configuration File [Months] Month1 = January Month2 = February [Another_Section]