in reply to Perl data types and references
my $config = {"delete" => 0, soFiles => []}; is a scalar variable holding a reference to a hash-table with two elements. my %config = ( "delete" => 0, soFiles => [] ); indeed constructs a "classic" hash-table.
are equivalent as the => automatically quotes its lefthand argument.my $config = {"delete" => 0, soFiles => }; my $config = {"delete" => 0, "soFiles" => };
You must indeed use $config->{delete} = 1; as $config holds a reference to the hash.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|