in reply to push/append to hash in a loop

kyle has shown you how to add key/value pairs to your hash. It might help you to show where it would be applicable to use push and dot equals. The push operator is used to add an element to the right-hand or high end of an array, like this

$ perl -le ' > @arr = qw{one two three}; > print qq{@arr}; > push @arr, q{four}; > print qq{@arr};' one two three one two three four $

Whereas the .= assignment operator (see perlop) is used to concatenate strings, like this

$ perl -le ' > $str = q{abcde}; > print $str; > $str .= q{fgh}; > print $str;' abcde abcdefgh $

I hope you find this useful.

Cheers,

JohnGG