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 is warn function in perl?
Why does Perl not have overloaded functions?
What is the importance of perl warnings?
What does read () command do?
What are the various advantages and disadvantages of perl?
How can you use Perl warnings and what is the importance to use them?
What does redo statement do in perl?
What is eval function in perl?
What is q (single q) operator in perl?
Comment on array slicing and range operator
What is boolean context?
what are prefix dereferencer and list them out?
How to disable the mod_perl from apache_server as i have used perlfect search on the site and its pagination is not working and the remedy is to disable the mod_perl.
How to start perl in interactive mode?
What are some of the key features of objects in perl?