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

What does a die() function do in perl?

977


What rules must be followed by modules in perl.

992


What's the difference between /^Foo/s and /^Foo/?

1184


What is the use of –w?

934


how to extract pin_code,phone_number,year from text file using regular expressions in perl

2236


What are prefix dereferencer?

921


what are the two ways to get private values inside a subroutine or block?

939


how to connect cisco switch uisng perl script

3847


Explain gmtime() function in perl?

976


Explain USE and REQUIREMENT statements?

930


Explain a tell function in perl?

964


you are required to replace a char in a string and store the number of replacements. How would you do that?

924


I have one question regarding to eval function. I know eval function is use for error checking but I am not able to understand below line. eval \'exec perl -S $0 ${1+\"$@\"}\' if 0; $0 for script name $@ set if error occur

2040


What does the q{ } operator do?

903


How to concatenate strings with perl?

864