beast schreef:
> What is the reason this following works
> $hours{$hour}->{count} + 1
>
> but this not works?
> $hours{$hour}->{count}++
>
>
> it actually part of this code:
>
> $hours{$hour} = { occur => $occur_utc,
> delay => $hours{$hour}->{delay} + $delay,
> count => $hours{$hour}->{count} + 1
> };
The increment in
$x = $y++;
is done *after* setting $x to the value of $y, so $x gets the old value
of $y.
Consider $x = ++$y;
Read perlop.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/