title: Combining two string with dot (.) in Perl
body: <p>I've got a problem in my Perl program when I try to combine a computer name in a string with a string with dot (.), please see the code below.</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  
  chomp(my $COMPUTERNAME = `hostname`); #this should give the computername e.g CH-B7G33
  my $complog = $COMPUTERNAME.".log"; 
  print "$complog";
  </code></pre>
  
  <p>The expected output would be.</p>
  
  <pre><code>CH-B7G33.log
  </code></pre>
  
  <p>But what I got is wrong, it printed out.</p>
  
  <pre><code>.logB7G33
  </code></pre>
  
  <p>Did I do something wrong in the code? Please help me, I'm a Perl beginner and by the way sorry to my English.</p>