Hi,
I'm creating a hash like this:
%h = (a => 1, b => 2);

I want to also be able to define a key 'c' in terms of value in a and b. 
I can do it in two lines:
%h = (a => 1, b => 2);
$h{c} = $h{a} + $h{b};

Is there any way to do this when creating the hash?
%h = (a => 1, b => 2, c => a + b)

I've tried referring back to the value in 'a' as: a, $m{a}, $a
but that does not work.

Can this be done?

Thanks.
--Paul

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to