Think about Loose Coupling | |
PerlMonks |
Re: Trouble skipping lines using Perlby Eily (Monsignor) |
on Nov 21, 2017 at 16:16 UTC ( [id://1203906]=note: print w/replies, xml ) | Need Help?? |
$chromosome =~ /^chrM/ may do what you need if you want $chromosome to start with chrM (that's what ^ means, it's the start of the string). Note that if you want to check if it is equal to "chrM" this is done with the eq operator, so $chromosome eq "chrM" (see Relational Operators and Equality Operators) Also FYI if you want to check that a string is contained in another, you can use index which is easier to use and less tricky than regular expressions.
In Section
Seekers of Perl Wisdom
|
|