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
How to create a directory in perl?
Explain splicing of arrays?
Which operator in perl is used for the concatenation of two strings?
What does next statement do in perl?
What is the different between array and hash in perl programming?
What is a perl references?
how to connect cisco switch uisng perl script
Why do you use Perl?
Differentiate use and require?
Create a function that is only available inside the scope where it is defined ?
What is stdin in perl?
In Perl we can show the warnings using some options in order to reduce or avoid the errors. What are that options?
What is v-strings?
How to read a file into a hash array?
Explain goto expr?