Greetings Wise ones :) I am making my first attempt at using a perl module (Bio::PrimerDesigner)and am needing some guidance. Here is the relevant part of my code, which is just me trying to copy the synopsis in the CPAN listing for this module. There is code prior the my $pd line and after the "use Bio::PrimerDesigner" that defines the %probe_hash in this script.
#!/usr/bin/env perl use strict; use File::Copy; use warnings; use diagnostics; use Bio::PrimerDesigner; my $pd = Bio::PrimerDesigner->new; while ((my $probe_key, my $probe_value)=each(%probe_hash)) { # # Define the DNA sequence, etc. # my $dna = $probe_value; my $seqID = $probe_key; # # Define design parameters (native primer3 syntax) # my %params = ( PRIMER_NUM_RETURN => 2, PRIMER_SEQUENCE_ID => $seqID, SEQUENCE => $dna, PRIMER_PRODUCT_SIZE => '500-600' ); # # Design primers # my $results = $pd->design( %params ) or die $pd->error; # # Make sure the design was successful # if ( !$results->left ) { die "No primers found\n", $results->raw_data; } # # Get results (single primer set) # my $left_primer = $results->left; my $right_primer = $results->right; my $left_tm = $results->lefttm; # # Get results (multiple primer sets) # my @left_primers = $results->left(1..3); my @right_primers = $results->right(1..3); my @left_tms = $results->lefttm(1..3); }
When I run this, I get the following error: No alias for 'PRIMER_PRODUCT_SIZE' at /script/location also, if I "print @left_primers;" will that print the contents of the array as expected?

In reply to Uncaught Exception from user code: no alias for... by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.