RE: Population of variables in hash values...

2002-11-08 Thread Timothy Johnson
] 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

RE: Population of variables in hash values...

2002-11-07 Thread Timothy Johnson
I don't see how that could possibly work, since you are declaring the value of $hash{1} to be $domain, which has not been initialized. You are declaring $hash{1} to be the VALUE of $domain. When you change $domain later, this won't update your hash retroactively. Maybe this is just a typo in

RE: Population of variables in hash values...

2002-11-07 Thread Timothy Johnson
of variables in hash values... Nope, No typo, this is exactly what I am trying to accomplish... I want the hash to store the variable (and thus be able to reference that variable and it's current value later on) and not the value of the variable. You are correct in the fact that it does not work

Re: Population of variables in hash values...

2002-11-07 Thread Felix Geerinckx
on do, 07 nov 2002 17:13:22 GMT, Tim Yohn wrote: Hey All, Is there an easy way to have variables in the value of a hash that are not populated until the value of the hash is used... my($domain); my(%hash) = ( 1 = '$domain' ); print_domain(test.com); sub

Re: Population of variables in hash values...

2002-11-07 Thread Tim Yohn
On Thu, 7 Nov 2002 10:35:22 -0800 Timothy Johnson [EMAIL PROTECTED] wrote: Then I guess the real question is why you are declaring two variables that you want to be concurrently updated when you can just use one. Obviously I must not be able to explain what I am trying to accomplish... I

Re: Population of variables in hash values...

2002-11-07 Thread John W. Krahn
Tim Yohn wrote: Hey All, Hello, Is there an easy way to have variables in the value of a hash that are not populated until the value of the hash is used... for example: my($domain); my(%hash) = ( 1 = $domain ); print_domain(test.com); sub print_domain() {

RE: Population of variables in hash values...

2002-11-07 Thread Timothy Johnson
Johnson Cc: [EMAIL PROTECTED] Subject: Re: Population of variables in hash values... On Thu, 7 Nov 2002 10:35:22 -0800 Timothy Johnson [EMAIL PROTECTED] wrote: Then I guess the real question is why you are declaring two variables that you want to be concurrently updated when you can just use

Re: Population of variables in hash values...

2002-11-07 Thread Tim Yohn
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

Re: Population of variables in hash values...

2002-11-07 Thread Todd W
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