What is the syntax used in Perl grep function?

Answer

a) grep BlOCK LIST

b) grep ( EXPR, LIST )

 

  • BLOCK: It contains one or more statements delimited by braces, the last statement determines in the block whether the block will be evaluated true or false.
  • EXPR: It represents any expression that supports $, particularly a regular expression. Against each element of the list, expression is applied, and if the result of the evaluation is true, the current element will be attached to the returned list
  • LIST: It is a list of elements or an array

All perl Questions

Ask your interview questions on perl

Write Your comment or Questions if you want the answers on perl from perl Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---