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 / devinder kumar

chop will indiscriminately remove (and return) the last
character passed to it, while chomp will only remove the
end of record marker (generally, "\n"), and return the
number of characters so removed.

Is This Answer Correct ?    40 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain subroutine in perl?

853


You want to open and read data files with perl. How would you do that?

837


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

922


What is a chop() function in perl?

950


How to close a directory in perl?

869


How can you use Perl warnings and what is the importance to use them?

902


What are perl array functions?

1000


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

1002


How to start perl in interactive mode?

971


Explain ivalue in perl?

908


You want to empty an array. How would you do that?

846


What are stdin, stdout and stderr?

1009


Which feature of perl provides code reusability?

940


How to do comment in perl?

906


How to dereference a reference?

927