use strict; use Config::Tiny; my $Session = 'W25376'; my $Configfile = "t1.cfg"; my $Config = Config::Tiny->read( '$Configfile' ); my $Name = $Config->{$Session}->{SESSIONNAME}; my $RID = $Config->{"$Session"}->{RID}; my $SID = $Config->{"$Session"}->{SID}; my $GATEWAY = $Config->{"$Session"}->{GATEWAY}; print "$Name\n"; print "$RID\n"; print "$SID\n"; print "$GATEWAY\n";