in reply to Reading a hash structure stored in a file
JSON, YAML, INI, TOML, XML... these are all serialization and data interchange formats. JSON, and YAML are particularly lightweight for representing datastructures such as hashes, arrays, and nested structures.
Are you committed due to some immutable legacy technical debt to using Perl files to store your data? Could you possibly adopt a more secure, simpler format such as JSON? JSON is popular because it is simple, and if treated as data (ie, not evaled by a Javascript engine as code) is fairly secure, in that it won't be exposing your code to injected code.
Perl supports JSON and YAML quite easily using modules from CPAN, and since Perl 5.14 JSON is even supported in the Perl core distribution via JSON::PP
Dave
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Reading a hash structure stored in a file
by johngg (Canon) on Jan 17, 2019 at 15:03 UTC | |
by hippo (Bishop) on Jan 17, 2019 at 15:44 UTC | |
by haukex (Archbishop) on Jan 17, 2019 at 18:41 UTC |