in reply to Re: File:Find pattern match question
in thread File:Find pattern match question

Couldn't get this to work

#!/usr/bin/perl use strict; use warnings; use Fcntl; #use File::Find; #use File::Find::Rule; use File::Find::Rule qw/ find /; #*****************Path Variables******************* our $wellpath = "N:\\repos\\open\\Wells\\Regulated"; our $surveypath = "N:\\repos\\open\\Surveys\\Regulated"; our $temp = "C:\\Temp\\"; #************************************************** my @dirs = find( -directory , name => qr{([MIPD]\d{8}$)}, -in => $temp, ); print join "\n", @dirs, '';
C:\Temp\hddzip>perl dirpath3.pl Can't locate method File::Find::Rule::-directory at dirpath3.pl line 16. I have installed File::Find::Rule

Replies are listed 'Best First'.
Re^3: File:Find pattern match question
by Anonymous Monk on Nov 01, 2013 at 02:51 UTC
    :) Try "directory" instead of "-directory"