Write syntax to use grep function?



Write syntax to use grep function?..

Answer / Jitendra Kumar Mahtha

In Perl, you can use the grep function with a block to filter elements from an array or list that match certain criteria. The basic syntax is: `grep { condition } @array`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

What is the difference between module and package?

4 Answers   EDS, IBM, Symantec,


Why to use perl?

1 Answers  


How will you create a file in perl?

1 Answers  


Is perl a case sensitive language?

1 Answers  


Which statement has an initialization, condition check and increment expressions in its body? Write a syntax to use that statement.

1 Answers  


Define print() function in perl?

1 Answers  


Differentiate use and require?

1 Answers  


Explain lists and ivalue?

1 Answers  


What does `new $cur->{LINK}' do? (Assume the current package has no new() function of its own.)

1 Answers  


What is the purpose of “_file_ literal” and “_line_ literal” in perl?

1 Answers  


what are the steps involved in reading a cgi script on the server?

1 Answers  


How to disable the mod_perl from apache_server as i have used perlfect search on the site and its pagination is not working and the remedy is to disable the mod_perl.

1 Answers  


Categories