Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Regular expression problems

by pvaldes (Chaplain)
on Apr 23, 2012 at 16:21 UTC ( #966635=note: print w/replies, xml ) Need Help??


in reply to Regular expression problems

Use of uninitialized value $1... Because, $1 is in fact undefined in your example.

my $procount2 = 1; foreach my $readingframe2(@protein){ my $protein; print "string is $_\n"; if(/MHGR/){ print "$1\n","motif is $_\n"; ##### <----- if(length($_)>=1){ print "length of motif is length($_)\n"; print OUT1 "Protein $procount2\n$_\n"; $procount2++; } } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://966635]
help
Chatterbox?
[Corion]: A good daypart!

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2017-01-17 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (152 votes). Check out past polls.