|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
PERL
DETAILS
Question: How do you match one letter in the current locale?
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.
|
|
|
Category |
Perl Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8721 users |
Added on |
10/28/2014 |
Views |
70554 |
Rate it! |
|
|
Question:
How do you match one letter in the current locale?
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. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How do I print the entire contents of an array with Perl?
|
View Answer
|
|
Perl uses single or double quotes to surround a zero or more characters. Are the single(' ') or double quotes (" ") identical?
|
View Answer
|
|
How many ways can we express string in Perl?
|
View Answer
|
|
How do you give functions private variables that retain their values between calls?
|
View Answer
|
|
Describe about the security vulnerability of PHP?
|
View Answer
|
|
Explain about returning values from subroutines (functions)?
|
View Answer
|
|
Determine the difference between my and local?
|
View Answer
|
|
What are the different types of eval statements?
|
View Answer
|
|
What are the different forms of goto in perl? Explain?
|
View Answer
|
|
What is a short circuit operator?
|
View Answer
|
|
Which has the highest precedence, List or Terms? Explain?
|
View Answer
|
|
What are the different types of perl operators?
|
View Answer
|
|
What is meant by splicing arrays explain in context of list and scalar.
|
View Answer
|
|
How do you work with array slices?
|
View Answer
|
|
What are the three ways to empty an array?
|
View Answer
|
|
What exactly is grooving and shortening of the array?
|
View Answer
|
|
How to use the command shift?
|
View Answer
|
|
Is there any way to add two arrays together?
|
View Answer
|
|
Explain about Typeglobs?
|
View Answer
|
|
How does a “grep” function perform?
|
View Answer
|