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 connect with sqlserver from perl and how to display database table info?

1001


Where the command line arguments are stored and if you want to read command-line arguments with Perl, how would you do that?

1152


What $! In perl?

1025


what are the three groups involved in information sharing?

937


What does the q{ } operator do?

961


Which has the highest precedence, List or Terms? Explain?

953


How to sort arrays in perl?

1083


List all the features of perl programming?

952


What are the reasons that cookie server can’t handle multiple connections?

992


Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.

937


Write an example explaining the use of symbol tables.

1001


Explain the use of 'my' keyword in perl?

1071


How to get help for perl?

1041


What are the features of perl language?

1149


How to read a directory in perl?

1104