in reply to get environment variables from a bourne file
%ENV = { %ENV, %BB_ENV };If you use strict and warnings, it will alert you that there is something wrong with this way of merging hashes:
diagnostics shows that you should use parens () instead of curlies {}.use warnings; use strict; use Data::Dumper; my %BB_ENV = (zzz => 555); %ENV = { %ENV, %BB_ENV }; print Dumper(\%ENV); __END__ Reference found where even-sized list expected at $VAR1 = { 'HASH(0x6f45f0)' => undef };
|
|---|