in reply to A good way to input data into a script w/o an SQL database
you already got very good answer, but, strange to me, some option was not mentioned.
Storable is a core module perfectly suited to load perl data structures from file. I have two command saved to read between Storable and YAML:
sto2yaml=perl -MYAML -MStorable -e "print Dump @{retrieve ($ARGV[0])}; +" $* yaml2sto=perl -e "use YAML (LoadFile); use Storable qw(nstore); @ar = +LoadFile($ARGV[0]); nstore(\@ar, $ARGV[1])" $*
Also Data::Dumper is a core module able to store and retrieve perl datastructures.
Then there is also Sereal a CPAN module offering great performances.
If you are only interested in something like an external configuration you can find fun my Modules as configuration files
L*
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: A good way to input data into a script w/o an SQL database
by GrandFather (Saint) on Sep 11, 2023 at 09:36 UTC |