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 warn function in perl?
What are the different string manipulation operators in perl?
Explain splicing of arrays?
Explain the difference between "my" and "local" variable scope declarations. ?
How do you find the length of an array?
How to read a directory in perl?
What is the use of strict?
Difference between the variables in which chomp function work ?
Why to use perl scripting?
How to renaming a file in perl programming?
What is a chomp() function in perl?
What is the use of command “use strict”?
What value is returned by a lone `return;’ statement?
How to read a single line from a file in perl?
What does the q{ } operator do?