title: Perl Can't use string as a symbol ref while strict refs
body: <p>I need some guidance with the following Perl code. When I leave the <code>no strict 'refs'</code>, the <code>sub</code> works fine. But if the <code>no strict 'refs'</code> is removed, then I get the error message:</p>
  
  <pre><code>Can't use string ("A") as a symbol ref while "strict refs" in use at test.pl
  </code></pre>
  
  <p>It dies in the lines marked as <em>"Here"</em> below. This <code>sub</code> needs to open (write >) all files from A..Z and based on the <code>regex</code> from the READ file (LOG) the output will be written to the correspond file output.</p>
  
  <pre><code>use strict;
  use Text::CSV_XS;
  no strict 'refs';  
  ...
  ...
  sub file_split {
  
      my ( $i, $fh, @FH );
      my ( $file ) = @_;
      my ( @alpha) = ("A".."Z");
  
      for ( @alpha) {                            
              $fh = $_ ;
              open ( $fh,"&gt;","$_-$file" )  || die $!;      &lt;--------- HERE
              push @FH, $fh;
      }
  
      my $csv = Text::CSV_XS-&gt;new( {  binary =&gt; 1,
                                      allow_whitespace =&gt; 1,
                                      allow_loose_escapes =&gt; 1,
                                      allow_loose_quotes =&gt;1,
                                      escape_char =&gt; undef ,
                                      sep_char =&gt; ',',
                                      auto_diag=&gt; 1
                                      } );
      open( LOG,"&lt;", $file ) || die $!;
      while ( my $row = $csv-&gt;getline( *LOG ) ) {
              if ( $row-&gt;[0] =~ /^(\w)/ ) {
                      print $1                       &lt;--------- HERE
                              "$row-&gt;[0]".",".
                              "$row-&gt;[1]" .",".
                              "$row-&gt;[2]" .",".
                              "$row-&gt;[3]" .",".
                              "$row-&gt;[4]".",".
                              "$row-&gt;[5]"."\n";
  
              } else {
                          print "Record skipped... --&gt; $row-&gt;[0] &lt;-- ... please verify     \n";
                  }
      }
  }
  </code></pre>