Re: Population of variables in hash values...

2002-11-18 Thread Jeff 'japhy' Pinyan
On Nov 7, Tim Yohn said: >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: You could use my DynScalar module (found on CPAN): use DynScalar; my $domain; my %hash = ( offline => dynamic { "$domain

RE: Population of variables in hash values...

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

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 rework

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'

RE: Population of variables in hash values...

2002-11-07 Thread Timothy Johnson
mothy 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

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 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.

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 Timothy Johnson
; Sent: Thursday, November 07, 2002 9:13 AM > To: [EMAIL PROTECTED] > Subject: Population of variables in hash values... > > > 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

RE: Population of variables in hash values...

2002-11-07 Thread Timothy Johnson
a typo in your post? -Original Message- From: Tim Yohn [mailto:tyohn@;alabanza.com] Sent: Thursday, November 07, 2002 9:13 AM To: [EMAIL PROTECTED] Subject: Population of variables in hash values... Hey All, Is there an easy way to have variables in the value of a hash that are not popul

Population of variables in hash values...

2002-11-07 Thread Tim Yohn
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... for example: my($domain); my(%hash) = ( 1 => "$domain" ); print_domain("test.com"); sub print_domain() { my($domain) = @_; print $hash{'1