What is the difference between chop & chomp functions in perl?

Answer Posted / mass

Chop removes the last character of string completely and returns that last character. While chomp removes the last character if it is new line.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is epoch time in perl?

525


what are the strategies followed for multiple form interaction in cgi programs?

506


How do I read command-line arguments with Perl?

605


What is the easiest way to download the contents of a URL with Perl?

563


What are the various advantages and disadvantages of perl?

469






what are the steps involved in reading a cgi script on the server?

498


What is stdin in perl?

547


What does -> symbol indicates in Perl?

568


What is Perl?

559


What is the purpose of _package_ literal?

537


What is posix in perl?

525


Explain grooving and shortening of arrays?

707


What are the various file operations in perl. Explain with example.

516


How do I replace every TAB character in a file with a comma?

551


What are numeric operators in perl?

542