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 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.
what are the steps involved in reading a cgi script on the server?
What is the function of virtual documents in cgi programs?
What is v-strings?
what is perl language?
Why Perl aliases are considered to be faster than references?
What is the difference between single (') and double (") quote in a string in perl?
What interface used in PERL to connect to database? How do you connect to database in Perl?
What does undef function in perl?
What is the importance of perl warnings?
How can the user execute a long command repeatedly without typing it again and again?
How to access parameters passed to a subroutine in perl?
Which feature of perl provides code reusability?
How will you create a file in perl?
What is automatic error handling in perl?