What is the difference between chop & chomp functions in perl?
Answer Posted / shaheed
If there is new line character at the end of string, chop()
and chomp() both will remove that new line character.
Else if there is no new line character at the end of string
then chop() will remove last character from the string
while chomp() keeps the string unchanged.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
How to connect with sqlserver from perl and how to display database table info?
Where the command line arguments are stored and if you want to read command-line arguments with Perl, how would you do that?
What $! In perl?
what are the three groups involved in information sharing?
What does the q{ } operator do?
Which has the highest precedence, List or Terms? Explain?
How to sort arrays in perl?
List all the features of perl programming?
What are the reasons that cookie server can’t handle multiple connections?
Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.
Write an example explaining the use of symbol tables.
Explain the use of 'my' keyword in perl?
How to get help for perl?
What are the features of perl language?
How to read a directory in perl?