ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 


 

Company >> Cap Gemini >> Interview Questions >> CGI Perl Interview Questions
 
  H1B Visa Interview Questions (1)   Accounting AllOther Interview Questions (1)   WebMethods Interview Questions (1)
  Oracle Apps Financial Interview Questions (1)   CRM General Interview Questions (1)   SAP ALE IDocs Interview Questions (1)
  SAP Security Interview Questions (1)   Business Warehouse Interview Questions (3)   HR Interview Questions (13)
  FI CO Interview Questions (6)   SD Interview Questions (20)   ABAP Interview Questions (59)
  Basis Interview Questions (5)   Cognos Interview Questions (4)   Business Objects Interview Questions (2)
  Java Related AllOther Interview Questions (1)   Weblogic Interview Questions (1)   DB2 Interview Questions (2)
  CICS Interview Questions (1)   Test Cases Interview Questions (3)   QA Concepts Interview Questions (3)
  Manual Testing Interview Questions (18)   QTP Interview Questions (10)   WinRunner Interview Questions (1)
  Unix AllOther Interview Questions (1)   Unix Commands Interview Questions (2)   Oracle General Interview Questions (2)
  Dot Net Framework Interview Questions (1)   ASP.NET Interview Questions (1)   Visual Basic Interview Questions (1)
  CGI Perl Interview Questions (1)   OOPS Interview Questions (1)
 
Back to Questions Page
Question   What is the difference between chop & chomp functions in perl? Rank Answer Posted By  
 Interview Question Submitted By :: Jkonakan
I also faced this Question!!   © ALL Interview .com
Answer
chop is used remove last character,chomp function removes
only line endings.
 
0 Thangaraju
 
 
Answer
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.
 
0 Wicked_sunny
[Wipro]
 
 
Answer
chop() removes the last character from a scalar value.

chomp() checks whether the last characters of a string or 
list of strings match the input line separator defined by 
the $/ system variable. If they do, chomp removes them.


 
0 Nagaraju Kancherla
[Wipro]
 
 
 
Answer
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.
 
0 Devinder Kumar
[Wipro]
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com