title: Perl use variable as a file name
body: <p>How to create a file with name containing variables with underscore between them. I need to create a file with name like this $variable1_$vraiable2_$variable3.txt              </p>
  
  <pre><code>@values=split(/\./, $line)
  my $fpga_name=$values[0];
  my $block_name=$values[1];
  my $mem_name=$values[2];
  my $memfilename="mem_init/$fpga_name_$block_name_$mem_name.txt";
  open(WRITE_MEM_FILE, "&gt;&gt;memfilename");
  print WRITE_MEM_FILE "$line \n";
  </code></pre>