Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why to use perl?

957


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.

2232


How do I debug a perl program?

990


How do I read command-line arguments with Perl?

1025


For a situation in programming, how can you determine that Perl is a suitable?

906


What is the purpose of redo statement?

1018


How do you find the length of an array?

978


What is stdin in perl?

973


what is Perl one liner?

903


Explain 'grep' function.

988


Comment on array slicing and range operator

953


Explain use of ‘my’ keyword in perl?

938


What are the features of perl language?

1088


What is the use of -t?

975


What does file test operators do in perl?

923