What is the difference between chop & chomp functions in perl?
Answer Posted / wicked_sunny
Chop and Chomp are two very similar functions. Both of them
are used to delete symbols from the tail of the given
string. While both work with string and list parameters,
Chop deletes any ending symbol Chomp deletes only specified
substring from the end. If you pass list to any of these
two, all list elements will get processed and the return
value would be the result of last operation.
| Is This Answer Correct ? | 22 Yes | 20 No |
Post New Answer View All Answers
Write a program to decode the data in the form using cgi programming
What are the advantages of perl programming?
What does last statement do in perl?
What happens in dereferencing?
Define say() function in perl?
List the data types that Perl can handle?
You want to add two arrays together. How would you do that?
Explain 'grep' function.
What is the function of virtual documents in cgi programs?
Explain goto label, goto name, and goto expr?
What does this symbol mean '->'?
What is a chop() function in perl?
How can the user execute a long command repeatedly without typing it again and again?
What are the various perl data types based on the context?
Explain arrays in perl.