Hello People,
I am stuck on a minor problem. How can I create a hash?

Data is as follow

---------- DATA ----------

# abc      <-- this_should_be_hash_name

{space} "random_name_or_number"  "date"  "other_things_1" "other_things_2"
{space} "random_name_or_number"  "date"  "other_things_1" "other_things_2"

# xyz      <-- this_should_be_a_new_hash_name (second_hash)

{space} "random_name_or_number"  "date"  "other_things_1" "other_things_2"

---------- END ----------

How can I create a hash by the name that matches

m/^#(?:\s+)?(\S+)$/

The hash should be created by the name of "$1" i.e (\S+)$
like if "$1" is 'abc' the hash should be %abc which will later be filled by
keys & values
that are matched in the next line. Thus hash should be created beforehand.

Am I making this clear?

Reply via email to