Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Regular expression problems

by pvaldes (Hermit)
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 musing on the Monastery: (11)
As of 2014-04-18 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (462 votes), past polls