Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
Perl Programming

Tutorial: Filtering.

 

In these examples we select only some countries to print. A process that takes a list and selects only certain items is a "filter". Some get through, some don't.

You may need to review testing strings and numbers before you attempt these questions.

1. Selecting a region.


Big

Print the countries where the region is Europe.

2. Picking the stans.


Big

Print only those countries where the name ends with stan

Hint:

3. Countries with a z.


Big

Print only those countries where the name contains the letter z

4. Small countries (by area).


Big

Print the countries that have an area of less than 100.