What is the difference between chop & chomp functions in perl?
Answer Posted / ramya
chop removes the last character and returns the character
chopped
Chomp removes any trailing string that corresponds to the
current value of $/ and returns number of characters removed
| Is This Answer Correct ? | 11 Yes | 10 No |
Post New Answer View All Answers
Why to use perl scripting?
How do I print the entire contents of an array with Perl?
What does Perl do if you try to exploit the execve(2) race involving setuid scripts?
Explain chomp?
What is an interpolation in perl?
Explain gmtime() function in perl?
Explain the meaning of subroutine?
How to compare two strings in perl?
What are the various file operations in perl. Explain with example.
Does Perl have objects? If yes, then does it force you to use objects? If no, then why?
Which functions in perl allows you to include a module file. State their differences.
Explain socket programming in perl?
Which feature of perl provides code reusability?
What is perl pop array function?
What is perl unshift array function?