|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
PERL
DETAILS
Question: Perl uses single or double quotes to surround a zero or more characters. Are the single(' ') or double quotes (" ") identical?
Answer: They are not identical. There are several differences between using single quotes and double quotes for strings. 1. The double-quoted string will perform variable interpolation on its contents. That is, any variable references inside the quotes will be replaced by the actual values. 2. The single-quoted string will print just like it is. It doesn't care the dollar signs. 3. The double-quoted string can contain the escape characters like newline, tab, carraige return, etc. 4. The single-quoted string can contain the escape sequences, like single quote, backward slash, etc.
|
|
|
Category |
Perl Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 7759 users |
Added on |
10/28/2014 |
Views |
67952 |
Rate it! |
|
|
Question:
Perl uses single or double quotes to surround a zero or more characters. Are the single(' ') or double quotes (" ") identical?
Answer:
They are not identical. There are several differences between using single quotes and double quotes for strings. 1. The double-quoted string will perform variable interpolation on its contents. That is, any variable references inside the quotes will be replaced by the actual values. 2. The single-quoted string will print just like it is. It doesn't care the dollar signs. 3. The double-quoted string can contain the escape characters like newline, tab, carraige return, etc. 4. The single-quoted string can contain the escape sequences, like single quote, backward slash, etc. 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 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
|
|
Explain about an ivalue?
|
View Answer
|
|
Name all the prefix dereferencer in perl?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Perl Interview Questions & Answers - Exam Mode /
Learning Mode
|