A couple of comments. I'm assuming that you are declaring the variable $total_time on line 8. But you are not really using it to do anything besides make a copy of $all_minutes so:
$all_minutes = $total_hours + $total_minutes;
$total_time = $total_time + $all_minutes;
$total_time_hours += int($total_time / 60);
can be optimized like this:
$all_minutes = $total_hours + $total_minutes;
$total_time_hours = int($all_minutes / 60);
also the lines
$row[0] = " " if($row[0] eq "");
$row[1] = " " if($row[1] eq "");
$row[2] = " " if($row[2] eq "");
etc..
could be rewritten as:
foreach $item(@row){
$item = " " if($item eq "");
}
BTW: I'm not criticizing the way you code, just offering tips to help you with maintainence and readability. So please don't take offence.
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.