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
What does `$result = f() .. g()' really return?
What are the various flags/arguments that can be used while executing a perl program?
Write a program that explains the symbolic table clearly.
what are the steps involved in reading a cgi script on the server?
Distinguish my and local?
How can you create anonymous subroutines?
Write a program to decode the data in the form using cgi programming
What is perl scripting?
What does file test operators do in perl?
What are the purpose of close(), getc() and read() functions?
Demonstrate subroutines in perl with a simple example.
How to open a directory in perl?
What is the difference between localtime() and gmtime() functions?
How can I implement the function overloading in Perl ? I read about the operator overloading, I do not know how to implement the function overloading. Thanks in advance ?
What is the use of 'ne' operator?