in reply to Re: Re: 3D array of hashes
in thread 3D array of hashes
I would then use some sort of logic or lookup table to decide if $month = 4 and $day = 15 is spring, summer, fall, or winter. Then once I had decided that, I would drop it all into place as described in my previous post.my ($month, $day, $year) = split /\//, $hash{Date};
But the more I think of it, the more I wonder if it's such a good idea to subdivide by season. It might be easier to work with if you make the season simply another element within the structure contained in the day. In other words,....
You'll have to think through how to implement get_season().my $season = get_season( $month, $day ); $archive{2003}{4}{15} = ( High => $hash{High}, Low => $hash{Low}, Wind => $hash{Wind}, Bar => $hash{Bar}, Seas => $season );
What made me first think of putting season as a field within the archive for that date is thinking back to my days as a retail buyer, where we dealt in two seasons per year, but advertised in four seasons. So it was always a mental exercise to remember that even though to me July is the beginning of the fall season, to the public July is summer, which isn't a season to a retailer.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: 3D array of hashes
by ManyCrows (Novice) on Oct 08, 2003 at 21:50 UTC | |
by Rhys (Pilgrim) on Oct 08, 2003 at 22:12 UTC | |
by ManyCrows (Novice) on Oct 08, 2003 at 22:36 UTC | |
by davido (Cardinal) on Oct 09, 2003 at 03:49 UTC | |
by davido (Cardinal) on Oct 08, 2003 at 22:05 UTC |