Budreaux (1) [Avatar] Offline
#1
Hi,

I am having a problem understanding the following line (this is from the 7th line of the code at the bottom of page 110):

<code>
$project_hours{$employee} += $hours;
</code>

From what I interpret from the code, this line is basically taking the lines from the file and adding them to the hash "project_hours" based on key/value = name/hours. What I don't understand is why was the "+=" assignment operator used. I thought this was strictly a numeric operator and would not have the same effect on string values. I ran the code with and without the "+" and got the same result, so it looks like the plus sign is not needed. Was this a typo?

Dave