Perl Programming Question: Download Perl Programming PDF

How do you match one letter in the current locale?

Tweet Share WhatsApp

Answer:

/[^W_d]/
We don't have full POSIX regexps, so you can't get at the isalpha() <ctype.h> macro save indirectly. You ask for one byte which is neither a non-alphanumunder, nor an under, nor a numeric. That leaves just the alphas, which is what you want.

Download Perl Programming PDF Read All 46 Perl Programming Questions
Previous QuestionNext Question
Assume that $ref refers to a scalar, an array, a hash or to some nested data structure. Explain the following statements:How do I print the entire contents of an array with Perl?