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 / wicked_sunny

Chop and Chomp are two very similar functions. Both of them
are used to delete symbols from the tail of the given
string. While both work with string and list parameters,
Chop deletes any ending symbol Chomp deletes only specified
substring from the end. If you pass list to any of these
two, all list elements will get processed and the return
value would be the result of last operation.

Is This Answer Correct ?    22 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does Perl have reference type?

1014


Explain different types of perl operators.

991


Explain perl. When do you use perl for programming? What are the advantages of programming in perl?

929


In Perl, what is grep function used for?

1133


What are the purpose of close(), getc() and read() functions?

924


What are numeric operators in perl?

1003


When would `local $_' in a function ruin your day?

1000


What is confess function in perl?

998


What are the functions that can be performed using cgi program?

975


What is the use of now constructor in perl?

1020


Explain split function in perl?

1042


Write a script to reverse a string without using perl's built in functions?

1043


Give an example of using the -n and -p option.

1064


How to read from a pipeline with Perl

1104


what is CPAN?

1048