What is the difference between chop & chomp functions in perl?
Answer Posted / shaheed
If there is new line character at the end of string, chop()
and chomp() both will remove that new line character.
Else if there is no new line character at the end of string
then chop() will remove last character from the string
while chomp() keeps the string unchanged.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What are the logical operators used for small scale operations? Explain them briefly.
How many types of primary data structures in Perl and what do they mean?
What are the advantages of perl programming?
You want to concatenate strings with perl. How would you do that?
What are the various flags/arguments that can be used while executing a perl program?
What is the difference between single (') and double (") quote in a string in perl?
Why do you use Perl?
Demonstrate subroutines in perl with a simple example.
What are prefix dereferencer? List them.
Explain gmtime() function in perl?
What is the difference between perl list and perl array?
How to implement a stack in Perl?
What does perl do in linux?
Which guidelines by Perl modules must be followed?
what is the function of Return Value?