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

There are some duplicate entries in an array and you want to remove them. How would you do that?

872


What are scalar data and scalar variables?

1065


what are prefix dereferencer and list them out?

983


Is there any way to add two arrays together?

917


How to close a file in perl?

899


What is 'rollback' command in perl?

912


You want to print the contents of an entire array. How would you do that?

901


what is the difference between java and cgi?

1012


What is the difference between localtime() and gmtime() functions?

973


Explain the execution of a program in perl.

931


What is the usage of -i and 0s options?

931


Explain join function in perl?

897


In Perl we can show the warnings using some options in order to reduce or avoid the errors. What are that options?

954


what is the function of Return Value?

1011


Elaborate on perl bite-wise operators.

857