#!/opt/iw-home/iw-perl/bin/iwperl -w
use strict;
use TeamSite:
irwalk;
use File::Basename;
my $dir="/default/main/branch1/STAGING/templatedata/type1";
my $d1=TeamSite:
irwalk->new(file_handler => \&custom_file_handler1);
$d1->dirwalk($dir);
sub custom_file_handler1
{
my ($this,$abs_filename,$depth) = @_;
if ($abs_filename =~ /data/) {
print "$abs_filename\n";
}
}
If I use the code above, I get more than what I want. It gives me datacapture.cfg and the files in presentation folder because of the templatedata directory.
If I changed the line to
if ($abs_filename =~ /\/data\//) {
I get no output. Any ideas?
I only want the dcrs in the data directory.
Thanks,