]
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
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
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
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
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
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() {
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
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
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