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


Please Help Members By Posting Answers For Below Questions

What are the reasons that cookie server can’t handle multiple connections?

527


What are the arguments and what do they mean in perl programming?

515


Explain returning values from subroutines?

532


How do I sort a hash by the hash value?

548


what is Perl one liner?

529






What is the difference between localtime() and gmtime() functions?

536


What is the different between array and hash in perl programming?

509


What are hashes?

531


What does the’$_’ symbol mean?

566


What are the various perl data types based on the context?

533


Explain socket programming in perl?

500


What is eval function in perl?

541


What is goto statement in perl?

508


What is perl scripting?

508


What are the purpose of close(), getc() and read() functions?

479