in reply to Regular Expression Hiccup
Please note that the code you showed has an extra closing curly brace.if ($text =~ /Screening Ligands by X-ray Crystallography/) { say "MATCH!"; } else { say "NOPE!"; }
I also agree with Anonymous Monk that a regex might not be the ideal solution for your problem. The index built-in is likely to work faster, and the use of a hash might also be considered, but we don't know enough about what you are trying to do to be able to help you more precisely.
|
|---|