Ruslan,
I made the changes you suggested and after a bit of tinkering everything works
well. However, I'm trying to format the time worked as hh:mm. This is the
block of code I'm using:
foreach my $enviro (keys %environment) {
my $user;
my %wholetime;
foreach $user (keys %timeworked) {
my @endTime;
my $temp = $timeworked{$user};
print "Temp -> $temp\n";
my $check = $temp / 60;
print $check . "\n";
my @temp = split /\./, $check;
$endTime[0] = $temp[0];
$endTime[1] = $timeworked{$user} % 60;
$wholetime{$user} = sprintf '%d:%02d', @endTime[0,1];
$environment{$enviro}{$user} = $wholetime{$user};
}
}
A couple of interesting things is happening. One is that the time is staying in
minutes with no formatting. The second and most bizarre is that the two 'print'
statements aren't doing anything. $temp is printing in the line that says
'print "Temp -> $temp" . "\n";' but that's it. "Temp -> " isn't printing. And
the line that says 'print $check;' doesn't do anything. No output whatsoever.
I can't for the life of me figure out why it is behaving the way it is as I've
compared it to near identical code in another script and it appears to be as it
should. Is there anything you see that seems out of the ordinary?
Thanks again,
Mathew
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com