I am stuck in program which need to build a hash of unknown number of keys which we will enter or give. If there would be a push function we can make loop and increase its size.But how will be it possible with hash.

Recommended Answers

This doesn't make any sense. When you say "an unknown number of keys" what are you talking about?

I mean:

$hash{$key}=$value;

Why would you need a push?

Jump to Post

All 2 Replies

This doesn't make any sense. When you say "an unknown number of keys" what are you talking about?

I mean:

$hash{$key}=$value;

Why would you need a push?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.