view filter.pm @ 63:3d3b8671de71 laserkard

[svn r64] Changed 1. About page text to agreed on 4/1/10 2. top_menu link "The Story" --> "About"
author hong
date Thu, 01 Apr 2010 20:06:28 -0400
parents 599d0315537d
children
line wrap: on
line source
1 package Filter;
2 use base 'Exporter';
3 our @EXPORT = ('filter');
6 sub filter
7 {
9 $ref = shift;
10 @list = @_;
11 my @ret = ();
13 for $element(@list)
14 {
15 if ($ref->($element))
16 {
17 push @ret, $element;
18 }
19 }
21 return @ret
23 }
26 1;