Perl Programming Question:

Download Job Interview Questions and Answers PDF

How do you match one letter in the current locale?

Perl Programming Interview Question
Perl Programming Interview Question

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 Interview Questions And Answers PDF

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?