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
What is perl? What is the basic command to print a string in perl?
What does a die() function do in perl?
How do I sort a hash by the hash key?
What is the difference between single (') and double (") quote in a string in perl?
How will you open a file in a write-only mode in perl?
Explain perl.
Explain the difference between die and exit in perl?
Mention what is cpan?
Explain goto name?
Why should I use the -w argument with my Perl programs?
What is warn function in perl?
Where the command line arguments are stored and if you want to read command-line arguments with Perl, how would you do that?
Explain subroutine?
Explain what is the scalar data and scalar variables in Perl?
What $! In perl?