Only because it's easier to read. If I was doing a large program, then it might make sense to use the reference method, but otherwise eval is more intuitive to me.
-----Original Message----- From: Todd W [mailto:trw3@;uakron.edu] Sent: Thursday, November 07, 2002 7:36 PM To: [EMAIL PROTECTED] Subject: Re: Population of variables in hash values... Tim Yohn wrote: > On Thu, 7 Nov 2002 11:04:26 -0800 > Timothy Johnson <[EMAIL PROTECTED]> wrote: > > >>It sounds like the eval solution proposed earlier is exactly what >>you're looking for then. You can just store the string in your hash >>and eval it when you need to print. > > > Yup! With a little reworking of how I'm calling everything that worked > like a charm. Thanks for the help everyone! > > Tim. I dont understand the eval. Why do it when you dont need to: [trwww@devel_rh trwww]$ perl -we 'use strict;my($d);my(%h) = (1 => \$d);$d="foo\n";print(${ $h{1} });' foo Store a reference to the scalar and dereference it when needed, as posted in another reply. Todd W. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]