this was my original code, and someone brought my attention to the fact that i 
did not assign any value to my hashes ( %sequences ). i figure he was 
absolutely right ( thank you for your help ). 
  I have came up with a value for my %sequences, but i would like to make sure 
i did it right. Again my main purpose on my code is to print ( Left_sequences= 
left_primers) and ( Right_sequences=Right_primers) from the  sequences output ( 
i called it " output.txt) that i generated from primer3.  
   
   
  #! /usr/bin/perl- w
  #programpro.pl
  use strict;
  use primer3;
   
  # initialize variables
   
   
  $sequences= primer3->new ( '-format=> 'fasta',
                                                '-file=>'output.txt'
                                              );
  my %sequences = $sequences{'primer'};
  my $key;
  my $file = “output.txt”;
   
  # Read a primer3 output file
   
  my $primer3 = primer3-> new ( -file=>”data/output.txt”);
  # iterate over sequences
   
  foreach $key (keys (%sequences)) {
     
     # Search for primers
     
     my $primer = primer3-> next_primer;
   
    print “$key\nLeft\t\t\tRight\n”;
    while ($primer=>getNextpair ( )) {
        print $primer=> LeftOligo ( ) . “\t” .
   $primer=>RightOligo( ) . “\n” ;
      }
     Print “\n”;
   
  }
   

       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Reply via email to