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
What does delete function do in perl?
what are the three groups involved in information sharing?
How to convert strings into an array in perl?
What is perl shift array function?
Explain the arguments for perl interpreter.
What is cpan in perl?
Give an example of the -i and 0s option usage.
What syntax is used for grep() function?
What is q (single q) operator in perl?
What is the purpose of “_file_ literal” and “_line_ literal” in perl?
What are the logical operators used for small scale operations? Explain them briefly.
What does length(%HASH) produce if you have thirty-seven random keys in a newly created hash?
How do I generate a list of all .html files in a directory?
What is use of ‘->’ symbol?
What is boolean context?