in reply to How do I dynamically create a hash table?
For example:%new_hash = (split(/;/,$variable_with_keys_and_values));
Outputs the value associated with the key 'no doughnut'%new_hash = (split(/;/,'apple;good;banana;good;citrus;good;no doughnut +;bad cop')); print $new_hash{'no doughnut'};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How do I dynamically create a hash table? (A straightforward Q, I know!)
by TedPride (Priest) on Oct 19, 2004 at 23:35 UTC | |
by ysth (Canon) on Oct 21, 2004 at 05:38 UTC |