"be consistent" | |
PerlMonks |
Re: Fine tuning my condition statementby strider corinth (Friar) |
on Nov 20, 2002 at 18:28 UTC ( [id://214562]=note: print w/replies, xml ) | Need Help?? |
One way would be this:
The '^' matches the beginning of a string, and the '$' matches the end, emulating an 'eq' function for whatever's in between them. The '|'s are roughly equivalent to an 'or' statement: this will match 'first' or 'second' or 'third'. Update: added explanation, and parens, thanks to Enlil. -- Love justice; desire mercy.
In Section
Seekers of Perl Wisdom
|
|