use strict; use warnings; use Config::Tiny; my $DATA =<new(); # Open the config, replace with read and $DATA with filename $Config = Config::Tiny->read_string( $DATA ); #$Config = Config::Tiny->read( $filename ); # see perldoc Config::Tiny my $s = $Config->{_}; # I was to lazy to finish this: my $INVITE = join(' ', 'INVITE sip:' . $s->{remotename} .'@'. $s->{ip}, 'SIP/2.0 Via:SIP/2.0/UDP', $s->{localusername} . '@' . $s->{ip} .':5060', 'From:sam', 'To: you', ); print $INVITE;