Newsgroups: fj.lang.perl
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!sinfony-news01!news-jp-0.abone.net!np0.iij.ad.jp!nf0.iij.ad.jp!news.iij.ad.jp!iijnet!news.nid.co.jp!takahasi
From: TAKAHASHI Masafumi <takahasi@soft.nid.co.jp>
Subject: Re: File Sarch
In-Reply-To: Your message of "17 Jan 1997 16:56:17 +0900"
X-Nntp-Posting-Host: rio
Content-Type: Text/Plain; charset=iso-2022-jp
Message-ID: <E45FA3.F4@Maria.nid.co.jp>
Sender: news@Maria.nid.co.jp
X-Dispatcher: impost version 0.96++ (Jan. 13, 1997)
Content-Transfer-Encoding: 7bit
Organization: Nippon Information Development Co.,Ltd. Tokyo, Japan
References: <5bnbb1$1c7@sally.isc.chubu.ac.jp>
Mime-Version: 1.0
Date: Fri, 17 Jan 1997 10:46:41 GMT
X-Pgp-Fingerprint: D8 AB 4C DD F4 CD 04 1F  E5 88 21 7D E3 23 FB 6D
X-Mailer: Mew version 1.54 on Emacs 19.28.1, Mule 2.3
Lines: 26
Xref: galaxy.trc.rwcp.or.jp fj.lang.perl:1626
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.perl&nb=1626&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

In message <5bnbb1$1c7@sally.isc.chubu.ac.jp>
  d95093@isc.chubu.ac.jp (satou_tomoya) writes:

> $B!!8=:_!"(Bperl$B$G$H$"$k%W%m%0%i%`$r=q$$$F$$$k$N$G$9$,!"(B
> $B!!%+%l%s%H%G%#%l%/%H%j$KFCDj$N%U%!%$%k$,$"$C$?>l9g$K!"%a%C%;!<%8$r(B
> $B!!I=<($7$F%W%m%0%i%`$r=*N;$7$?$$$N$G$9$,!"$3$N$h$&$JF0:n$O(B
> $B!!$I$&$d$C$F<B8=$9$l$P$h$m$7$$$N$G$7$g$&$+!)(B

opendir, readdir, closedir $B$r;H$($P%G%#%l%/%H%jCf$N(B
$B%U%!%$%kL>$rF@$k$3$H$,$G$-$^$9!#(B
$B4JC1$JNc$r=q$$$F$_$^$9!#(B

    $PATTERN = "$BC5$7$?$$%U%!%$%kL>(B"; # $B@55,I=8=(B
    opendir(DH, '.') || die;
    while ($s = readdir DH) {
        if ($s =~ /$PATTERN/) {
            print "$PATTERN $B$a$C$1(B!\n";
            last;
        }
    }
    closedir DH;

-- 
$B9b662m;K(B ($B3t(B)$B%(%L%"%$%G%$(B
<takahasi@soft.nid.co.jp>

