I have found people are searching my blog to find the other way. I mean they have the character array, now they want to convert it into string back. Here is the example to do such things.
When the above code will execute, below will happen
## Convert String into array
my $str = " Perl: convert character array to string ";
my @char_array = split(//,$str);
## Make string from each value of char separated by string
$str = "@char_array";
## Replace the Extra separating spaces with blank
$str =~ s/(.)\s/$1/seg; ## Simple Regex
Array to string with separated by space.Hope this little explanation will help you guys.
P e r l : c o n v e r t c h a r a c t e r a r r a y t o s t r i n g
Now squeeze the extra spaces will make above string into.
Perl: convert character array to string