What is the difference between chop & chomp functions in perl?
Answer Posted / nagaraju kancherla
chop() removes the last character from a scalar value.
chomp() checks whether the last characters of a string or
list of strings match the input line separator defined by
the $/ system variable. If they do, chomp removes them.
| Is This Answer Correct ? | 25 Yes | 5 No |
Post New Answer View All Answers
How will you get the count of parameters passed to a perl subroutine?
What is the syntax used in Perl grep function?
Explain the execution of a program in perl.
How to code in perl to implement the tail function in unix?
What is Perl?
What is -> symbol in perl?
What are the various perl data types based on the context?
What does delete function do in perl?
What is confess function in perl?
Explain USE and REQUIREMENT statements?
How to remove a directory in perl?
What happens when you return a reference to a private variable?
What is grep used for in perl?
What is perl scripting?
How will you access an element of a perl array?