Hi everyone,

I get this error when I run my script, and I don't understand why:

"Can't use string ("CHR3") as a symbol ref while "strict refs" in use 
at AtIntergenicTableSort.pl line 53. "

I'm trying to split my output into 5 seperate files based on what is 
in the key. Here is a snip of  code:

#Sort the hash and write to a new file
foreach $k (sort keys (%all_genes)) {
         for (1..5){
                 if ($k =~ /[$_]g/){
                         $file = "CHR$_";
                         print $file ">$k\t$all_genes{$k}\n";
                         print ">$k \t $all_genes{$k}\n";
                         last;
                 }

Reply via email to