summaryrefslogtreecommitdiff
path: root/regress/base/search.pl
blob: 7393a2e5b199a43e34f673aaa2e30005b5e19c91 (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
#!/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.2 2001/05/04 14:32:35 fukachan Exp $
#

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

$obj->open || croak("cannot open $map");
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;