What is the difference between chop & chomp functions in perl?
Answer Posted / devinder kumar
chop will indiscriminately remove (and return) the last
character passed to it, while chomp will only remove the
end of record marker (generally, "\n"), and return the
number of characters so removed.
| Is This Answer Correct ? | 40 Yes | 4 No |
Post New Answer View All Answers
Explain subroutine in perl?
You want to open and read data files with perl. How would you do that?
What is the usage of -i and 0s options?
What is a chop() function in perl?
How to close a directory in perl?
How can you use Perl warnings and what is the importance to use them?
What are perl array functions?
Write a program to concatenate the $firststring and $secondstring and result of these strings should be separated by a single space.
How to start perl in interactive mode?
Explain ivalue in perl?
You want to empty an array. How would you do that?
What are stdin, stdout and stderr?
Which feature of perl provides code reusability?
How to do comment in perl?
How to dereference a reference?