What is the difference between chop & chomp functions in perl?
Answer Posted / devinder kumar
chop will indiscriminately remove (and return) the last
character passed to it, while chomp will only remove the
end of record marker (generally, "\n"), and return the
number of characters so removed.
| Is This Answer Correct ? | 40 Yes | 4 No |
Post New Answer View All Answers
What is the importance of perl warnings? How do you turn them on?
Differentiate use and require?
What does file test operators do in perl?
Comment on data types and variables in perl.
How many data types are there in perl?
How to get help for perl?
What does cgi program store?
what is Chop & Chomp function does?
How to close a file in perl?
What are the arguements we normally use for perl interpreter?
Explain the various characteristics of perl.
Explain 'grep' function.
What does the’$_’ symbol mean?
What are the options that can be used to avoid logic errors in perl?
What happens when you return a reference to a private variable?