in reply to push/append to hash in a loop
$ 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
|
|---|