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

Chop function removes the last character of any specified
string or variable and returns the chopped data.

Ex: $a="abcdefghijkla";
$b= chop($a);
print $a;

Output - abcdefghijkl

Where as chomp removes all the new line at the end of any
specified string or variable and returns nothing.

Is This Answer Correct ?    15 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Distinguish my and local?

911


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

834


what is Perl one liner?

860


How do I sort a hash by the hash key?

873


How to close a file in perl?

891


How we can navigate the xml documents?

937


How to compare two strings in perl?

890


How many ways can we express string in Perl?

897


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

854


What is perl? What is the basic command to print a string in perl?

832


what is the main function of fork() in cgi programming?

1035


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

851


How to open a directory in perl?

1030


Why do we use "use strict" in perl?

915


What are the advantages of perl programming?

945