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 'commit' command in perl?
What is the closure in PERL?
What is qq (double q)operator in perl?
How are parameters passed to subroutines in perl?
What is automatic error handling in perl?
Explain substr function in perl?
What does cgi program store?
Explain goto expr?
Mention the difference between die and exit in Perl?
Distinguish my and local?
What value is returned by a lone `return;’ statement?
What is the syntax used in Perl grep function?
What are some common methods to all handles in perl?
How can you create anonymous subroutines?
Why to use perl scripting?