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

What are the logical operators used for small scale operations? Explain them briefly.

924


How many types of primary data structures in Perl and what do they mean?

1332


What are the advantages of perl programming?

945


You want to concatenate strings with perl. How would you do that?

821


What are the various flags/arguments that can be used while executing a perl program?

816


What is the difference between single (') and double (") quote in a string in perl?

907


Why do you use Perl?

918


Demonstrate subroutines in perl with a simple example.

819


What are prefix dereferencer? List them.

919


Explain gmtime() function in perl?

913


What is the difference between perl list and perl array?

815


How to implement a stack in Perl?

954


What does perl do in linux?

887


Which guidelines by Perl modules must be followed?

965


what is the function of Return Value?

999