in reply to Appending characters to an existing string

You are doing perl without strictures enabled. This is a very very bad idea. The code samples you have provided would not even compile under strictures, and furthermore had you been using strictures the proper use of the concatenation operator '.' would have been clear.

Please make sure that every script that you write starts with

use strict; use warnings;
or if you are on a pre 5.6 version of perl (you may need to alter the path after the #! mark as required by your local setup)
#!perl -w use strict;
You will find that you learn much faster when the compiler is constantly pointing out ambiguous structures, errors, and other forms of strangeness.

Incidentally if you wish to append chars to a string contained within a scalar the normal approach is

$foo.='some string';
Just about anytime you have a construct that goes like
$foo=$foo (operator) (value)
you can rewrite it as
$foo (operator)= (value)
Note that there is NO space in between the operator and the equals. Common examples of this are
$foo+=10; $foo*=2; $foo.='bar'; $foo||='default';
HTH

--- demerphq
my friends call me, usually because I'm late....