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
Why to use perl?
How to disable the mod_perl from apache_server as i have used perlfect search on the site and its pagination is not working and the remedy is to disable the mod_perl.
How do I debug a perl program?
How do I read command-line arguments with Perl?
For a situation in programming, how can you determine that Perl is a suitable?
What is the purpose of redo statement?
How do you find the length of an array?
What is stdin in perl?
what is Perl one liner?
Explain 'grep' function.
Comment on array slicing and range operator
Explain use of ‘my’ keyword in perl?
What are the features of perl language?
What is the use of -t?
What does file test operators do in perl?