Home
Perl
Array
CGI
Class
Data Type
Database
File
GUI
Hash
Language Basics
Network
Regular Expression
Report
Statement
String
Subroutine
System Functions
Win32
XML
grep value : grep « Regular Expression « Perl
Perl
Regular Expression
grep
grep value
@a = (1 .. 10); @b = grep {$_ > 5} @a; print join(
", "
, @b);
Related examples in the same category
1.
grep with regular rxpression
2.
grep {$_ *= 2}
3.
Using grep function
4.
Using grep to remove word
5.
Using grep with expression
6.
Using grep with the file-test operators.
7.
The grep function evaluates the expression (EXPR) for each element of the array (LIST).
8.
grep function with regular expression