in reply to
Initializing an anonymous hash
Better than string
eval
, put the code in the file and
do
or
require
the file.
Comment on
Re: Initializing an anonymous hash
Replies are listed 'Best First'.
Re^2: Initializing an anonymous hash
by
Anonymous Monk
on Mar 30, 2012 at 16:05 UTC
In my situation, I need to read strings from a file as I moved some of this initialization to a data file. This is the only time I need to build a hash from the string. Rest of the data are just strings.
[reply]
In Section
Seekers of Perl Wisdom