Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2017-12-16 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (450 votes). Check out past polls.

    Notices?