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

Answer Posted / preethi

chop removes last character of the given string whereas
chomp removes the whitespace along with the character at the
end

chop-------> Perl----> Per
chomp------> Perl Program ----> Perl

Is This Answer Correct ?    4 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

There are two types of eval statements i.e. Eval expr and eval block. Explain them.

482


what is Chop & Chomp function does?

596


How do I read command-line arguments with Perl?

605


Does Perl have reference type?

526


What is the use of -t?

549






How interpreter is used in perl?

488


What is stdin in perl?

548


What happens in dereferencing?

538


Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.

536


How can you call a subroutine and identify a subroutine?

506


What is hash?

555


What is perl? What is the basic command to print a string in perl?

486


How to create a package?

526


Can you add two arrays together?

527


Explain cpan?

534