- or download this
open(FILE,'../env.conf') or die "not there";
- or download this
my $content = do {local $/; <FILE>};
- or download this
my %conf = map { /^([^=]+)=(.*)$/; $1 => $2 } split /\n/, $content;
- or download this
my %conf;
while (<FILE>) {
...
my ($k,$v) = $_ =~ /^([^=]+)=(.*)$/;
$conf{$k} = $v if $k;
}