Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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++; } } }


Comment on Re: Regular expression problems
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-07-30 03:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls