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 / nagaraju kancherla

chop() removes the last character from a scalar value.

chomp() checks whether the last characters of a string or
list of strings match the input line separator defined by
the $/ system variable. If they do, chomp removes them.


Is This Answer Correct ?    25 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the syntax used in Perl grep function?

993


What value is returned by a lone `return;’ statement?

1025


“The methods defined in the parent class will always override the methods defined in the base class”. What does this statement means?

973


Define print() function in perl?

882


How many types of operators are used in the Perl?

993


What is 'commit' command in perl?

1057


Explain the difference between declarations of 'my' and 'local' variable scope in perl?

891


Explain the various characteristics of perl.

914


How to read multi lines from a file in perl?

886


What are the advantages of programming in perl?

986


Which operator in perl is used for the concatenation of two strings?

968


What is the difference between use and require in perl programming?

896


What are the options that can be used to avoid logic errors in perl?

916


Write a program to concatenate the $firststring and $secondstring and result of these strings should be separated by a single space.

1020


What is the difference between perl list and perl array?

831