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

How to deleting an existing file in perl programming?

905


What is the use of –w?

934


How to read from a pipeline with Perl

1042


What is the difference between perl list and perl array?

863


What are the steps involved when the cgi program starts running?

911


Define operators used in perl?

938


What are some common methods to all handles in perl?

920


Explain the functioning of conditional structures in perl.

945


When does circular reference occur?

905


How can you call a subroutine and identify a subroutine?

986


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

894


How to know whether a key exists or not in perl?

980


How do you set environment variables in perl?

1041


What is the use of -t?

963


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

960