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
What is perl I used for?
What is an interpolation in perl?
What is the difference between perl array and perl hash?
Explain split function in perl?
What is automatic error handling in perl?
Explain USE and REQUIREMENT statements?
What are the arguements we normally use for perl interpreter?
Explain perl. When do you use perl for programming? What are the advantages of programming in perl?
How to read multi lines from a file in perl?
How to sort arrays in perl?
What is subroutine in perl?
What is the difference between die and exit in perl?
Explain ivalue in perl?
In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?
How to concatenate strings with perl?