diff options
author | Slaven Rezic <slaven@rezic.de> | 2005-02-17 23:30:13 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-02-18 09:53:36 +0000 |
commit | 6f028b0150dd9565638af63708c17381bbafce85 (patch) | |
tree | 161b81a2db9cf37996e8dad0e8d2acabaaab13af /x2p/find2perl.PL | |
parent | 1b641bfc0adaa36fd81d349c214379b379436eec (diff) | |
download | perl-6f028b0150dd9565638af63708c17381bbafce85.tar.gz |
find2perl, new options
Message-Id: <1108675813.24421@devpc01.iconmobile.de>
p4raw-id: //depot/perl@23979
Diffstat (limited to 'x2p/find2perl.PL')
-rw-r--r-- | x2p/find2perl.PL | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/x2p/find2perl.PL b/x2p/find2perl.PL index cc6c6d805d..f10521abf4 100644 --- a/x2p/find2perl.PL +++ b/x2p/find2perl.PL @@ -99,8 +99,10 @@ while (@ARGV) { } elsif ($_ eq '!') { $out .= tab . "!"; next; - } elsif ($_ eq 'name') { - $out .= tab . '/' . fileglob_to_re(shift) . "/s"; + } elsif (/^(i)?name$/) { + $out .= tab . '/' . fileglob_to_re(shift) . "/s$1"; + } elsif (/^(i)?path$/) { + $out .= tab . '$File::Find::name =~ /' . fileglob_to_re(shift) . "/s$1"; } elsif ($_ eq 'perm') { my $onum = shift; $onum =~ /^-?[0-7]+$/ @@ -783,6 +785,18 @@ File name matches specified GLOB wildcard pattern. GLOB may need to be quoted to avoid interpretation by the shell (just as with using C<find(1)>). +=item C<-iname GLOB> + +Like C<-name>, but the match is case insensitive. + +=item C<-path GLOB> + +Path name matches specified GLOB wildcard pattern. + +=item C<-ipath GLOB> + +Like C<-path>, but the match is case insensitive. + =item C<-perm PERM> Low-order 9 bits of permission match octal value PERM. |