Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 surveying the Monastery: (18)
As of 2015-07-28 19:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls