summaryrefslogtreecommitdiff
path: root/regress/base/search.pl
blob: 91ff271780f83fcf8a2eddf924cd37ab89d2e3f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env perl
#-*- perl -*-
#
#  Copyright (C) 2001,2002 Ken'ichi Fukamachi
#   All rights reserved. This program is free software; you can
#   redistribute it and/or modify it under the same terms as Perl itself. 
#
# $FML: search.pl,v 1.3 2002/04/18 14:18:08 fukachan Exp $
#

use strict;
use Carp;
use IO::Adapter;
my $debug = defined $ENV{'debug'} ? 1 : 0;
my $map   = shift || 'file:/var/spool/ml/elena/recipients';
my $obj   = new IO::Adapter $map;

{
	$obj->open || croak("cannot open $map");

	my $x;
	while ($x = $obj->getline) { print "<< ", $x if $x =~ /\S+/;}

	print "\n";
	$obj->close;
}

for ('rudo', 'fukachan') {
    print "* search $_ in $map\n";
    print $obj->find($_), "\n";
}

exit 0;