title: perl (Statistics::PCA): Can't use string ("0") as an ARRAY ref while "strict refs"
body: <p>I'm trying to use the <a href="http://search.cpan.org/~dsth/Statistics-PCA-0.0.1/lib/Statistics/PCA.pm" rel="nofollow">Statistics::PCA</a> package to conduct a PCA on some genetic variants. The package requires reading in a list of lists (if I understood it correctly, that can be an array of arrays, right?). </p>
  
  <p>Below is part of my code where I create arrays for each individual (each individual is an actual human subject that gets an array filled with 0's and 1's, which represent the presence or absence of a genetic variant called an "SV"), and then push them in my array of arrays called @LoL_SVs:</p>
  
  <pre><code>my @LoL_SVs;
  
  foreach (@individuals) {
      my $ind = $_;
      foreach (@all_SVs) {
          if ($SV{$ind}{$_} != 1) {
              push(@{$SVs{$ind}}, "0");
          }
          if ($SV{$ind}{$_} == 1) {
              push(@{$SVs{$ind}}, "1");
          }
      }
      push @LoL_SVs, [ @{$SVs{$ind}} ];
  } 
  </code></pre>
  
  <p>I then try to load the data as described on the <a href="http://search.cpan.org/~dsth/Statistics-PCA-0.0.1/lib/Statistics/PCA.pm" rel="nofollow">CPAN</a> website of the module (see paragraph *load_data*):</p>
  
  <pre><code>use Statistics::PCA;
  
  my $pca = Statistics::PCA-&gt;new;
  
  $pca-&gt;load_data ( { format =&gt; 'table', data =&gt; @LoL_SVs, } ); 
  # ^ this line is where it goes wrong
  </code></pre>
  
  <p>Unfortunately this doesn't work, and I get the error message:</p>
  
  <blockquote>
    <p>Can't use string ("0") as an ARRAY ref while "strict refs" in use at /home/abdel/myperl/share/perl/5.10.1/Statistics/PCA.pm line 189.</p>
  </blockquote>
  
  <p>Any idea what might go wrong here? </p>
  
  <p>I hope the problem is well specified, otherwise please let me know if you need more info! Many thanks!</p>