Even if you prepend the '0' before values, it still isn't enough. For example 2000<2008 but 10/2000>08/2008, so it is right to check big things first.
About the hashes, my point was that the usual case is that you define a hash as
%hash = (key1=>value1, key2=>value2...); and it is not frequent (if plausible) to use the => symbol inside the
key definition. You say
$ClubTotal{'DayOfMonth'=>$date}{..} =... which puts the '=>' in the key. Now, the hash concept is that a hash is just a table organized by
distinct words. As such, there is no point in prefixing the 'DayOfMonth' (a constant string before the date) and the '=>' is really
misleading because one expects a value after it. It would be much more readable to write something like this:
%ClubTotal = {
$date => {
TotalPerDay=>1,
HourSignIn=>
{
Value=>$hour,
ToPerlHour=>$perlHour
}
}
}
This is just an example. Things should be as simple as possible. For example, in your code you say:
$ClubTotal{ 'DayOfMonth'=> $date }{'Date'} = $date ;, which means that your key and value are the same variable! There are 3
date's in this code which is a waste of time (and space). Simply stating
$ClubTotal{$date}=... is enough since the date you want is the key of the hash.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.