File: README

package info (click to toggle)
libfile-fnmatch-perl 0.02-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 188 kB
  • ctags: 422
  • sloc: perl: 12; makefile: 2
file content (38 lines) | stat: -rw-r--r-- 1,012 bytes parent folder | download | duplicates (2)
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
34
35
36
37
38
File/FnMatch version 0.01
=========================

File::FnMatch exposes your system's fnmatch(3) capabilities to Perl.
While considerably less powerful than regular expressions, shell-style
patterns are yet useful and familiar to a large audience of end-users.

----------------------------------------------------------------------
N.B.:  Some platforms, notably Win32, do not supply an fnmatch
       implementation.  This module will not build on those platforms.
----------------------------------------------------------------------

Briefly:

   use File::FnMatch qw(:fnmatch);

   opendir(D, '.');
   while (my $fn = readdir(D)) {
     next unless fnmatch('*.exe', $fn, FNM_PERIOD|FNM_PATHNAME);
     ...
   }

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

COPYRIGHT AND LICENCE

Copyright (C) 2005 Michael J. Pomraning

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.