Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Keep getting "use of unitialized value" error in a weird place

by johngg (Canon)
on Apr 09, 2016 at 16:50 UTC ( [id://1160013]=note: print w/replies, xml ) Need Help??


in reply to Keep getting "use of unitialized value" error in a weird place

Are you sure you want $aa-1 as the offset in your substr?

$ perl -Mstrict -Mwarnings -E ' my $str = q{abc} x 3; for ( my $idx = 0; $idx < length $str; $idx += 3 ) { my $three = substr $str, $idx - 1, 3; say $three; }' c cab cab $
$ perl -Mstrict -Mwarnings -E ' my $str = q{abc} x 3; for ( my $idx = 0; $idx < length $str; $idx += 3 ) { my $three = substr $str, $idx, 3; say $three; }' abc abc abc $

I know nothing of genetics so that might be what you want but it looks weird.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: Keep getting "use of unitialized value" error in a weird place
by LanX (Saint) on Apr 09, 2016 at 17:17 UTC
      this will take away the error, but then when i look at the output of the loop it's littered with stop codons. if i print $lol2 from within the loop, i get the amino acid sequences and they look good (stops always followed by M or some alternative start codon), but i still get this error.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1160013]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-23 07:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found