in reply to Re^2: Tallying appearance of a unique string from hash keys
in thread Tallying appearance of a unique string from hash keys
With this you can do things like this:# Populate a hash. my %result = some_function(%data); sub some_function { my %passed = @_; my %to_return; # Do stuff with %passed here and populate %to_return return %to_return; }
and so on. (I'm not suggesting that those be actual functions you use, but that gives you an idea.)my %distribution = degree_distribution(); my %random_distribution_1 = random_distribution(); my %random_distribution_2 = random_distribution(); my %random_distribution_3 = random_distribution(); output(%distribution); output(%random_distribution_1); output(%random_distribution_2); output(%random_distribution_3);
Before long I predict that having to repetitively work with 3 random distributions will get very old. That's where you'll want to work with more complex data structures. For that read references quick reference and come back if you have any questions.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Tallying appearance of a unique string from hash keys
by jack_j (Initiate) on Mar 28, 2009 at 19:17 UTC | |
by ig (Vicar) on Mar 28, 2009 at 20:45 UTC |