>>>>> "Kelly" == Kelly Jones <[EMAIL PROTECTED]> writes:

Kelly> I have a file with this in it:
Kelly> a.b = 10
Kelly> c.d.e = 11
Kelly> f.g.h.i.j.k = 12

Kelly> Based on that, I want to set:

Kelly> $HASH{a}{b} = 10;
Kelly> $HASH{c}{d}{e} = 11;
Kelly> $HASH{f}{g}{h}{i}{j}{k} = 12;

Kelly> This is easy using eval(), but is there a better way?

Yes. http://www.perlmonks.org/index.pl?node_id=443584

And if you want better answers to questions, use monks.
Not sure why these mailing lists exist, anyway!

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to