title: Say feature in Perl
body: <p>I Have a below Perl code</p>
  
  <pre><code>$fs_headerrecord_cut_casettenumber_pad_len = 2;
  $fs_headerrecord_batch_casettenumber_start_pos = 21;
  $fs_headerrecord_batch_casettenumber_data_len = 2;
  $fs_header_record = 1;
  $pad_length = 0;
  my $dir = ".";
  opendir(DIR, $dir) or die "Cannot open directory: $dir!\n";
  my @files = readdir(DIR);
  closedir(DIR);
  
  open my $out, "&gt;&gt;output.txt" or die "Cannot open cutfile!\n";
  foreach my $file (@files) {
  
      #next unless (-M $file &lt;= 1 &amp;&amp; $file =~ /^fs.*\.DTA$/i) ;
      if (-M $file &lt;= 1 &amp;&amp; $file =~ /^fs.*\.DTA$/i) {
          #print log_date() ."$file\n";
          print "$file\n";
          open my $fs_in, "&lt;$file" or die "Cannot open $file!\n";
          while (&lt;$fs_in&gt;) {
              $recordlength = substr($_,220,1);
              if ($recordlength == $fs_header_record) {
                  say $out ' ' x $pad_length, 'H', substr($_,0,1), say $out ' ' x $fs_headerrecord_cut_casettenumber_pad_len, substr($_, $fs_headerrecord_batch_casettenumber_start_pos, $fs_headerrecord_batch_casettenumber_data_len);
  </code></pre>
  
  <p>I want to write "H" before casettenumber. The output which i am getting is below</p>
  
  <pre><code>OUTPUT
  
  
  
  14
  H 1
    14
  H 1
    14
  H 1
    14
  H 1
    14
  H 1
    14
  </code></pre>
  
  <p>Expected Output</p>
  
  <pre><code>H 14
  H 14
  H 14
  H 14
  H 14
  </code></pre>
  
  <p>When i am printing "H" it is getting printed in a new line. Can anybody please tell me what is wrong in my code?</p>