File::FindByRegex

Description

File::FindByRegex is a Perl wrapper for File::Find that finds a directory tree and runs some action for each file whose name matchs a regex. SYNOPSYS use File::FindByRegex; $find = File::FindByRegex->new( { -srcdir => [C:tmpteradata-sql], -tardir => C:tmpteradata-sqldoc, -find => {no_chdir => 1}, -callbacks => { qr/.p(l|m|od|t)$/oi, => &treat_pod, qr/sql.+?.sql$/oi, => treat_pod, qr/.html?$/oi, => &treat_html, qr/.txt$/oi => &treat_txt, qr/.(jpg|gif|png|bmp|tiff)$/ => sub { &treat_graphic(@_) } }, -ignore => [ qr/eg.+.sql$/oi, # *.sql in directory eg qr/java/oi, # All files in java directory. ], -excepts => [ qr/java.*?.html?$/oi # dont ignore *.html in java/ ] }); sub File::FindByRegex::treat_pod { my $this = shift; ... } sub File::FindByRegex::treat_html { my $this = shift; ... } sub File::FindByRegex::treat_txt { my $this = shift; ... } sub File::FindByRegex::treat_graphic { my $this = shift; ... } $find->travel_tree;.

Findbyregex - Filefindbyregex - Sub - Wrapper - Shift - Perl - Treat - Libraries - Programming

Published By:Enrique Castilla Contreras

License Type:Freeware

Date Added:22 October, 2010

Version:1.2

Price:Free

Downloads:76

Size:10.2 KB

Platform: Linux

What people say
- required fields
     
Related Downloads

Test::Stochastic is a Perl module to check probabilities of randomized methods. SYNOPSIS use Test::Stochastic qw(stochastic_ok); stochastic_ok sub { ...random sub...}, {a => 0.4, b => 0.6}; stochastic_ok {a => 0.4, b => 0.

DateAug 26, 2010

AuthorAbhijit Mahabal

Size4.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

ReleaseAction - call actions upon release.

DateAug 25, 2010

AuthorBen Tilly

Size4.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Benchmark::Forking is a Perl module to run benchmarks in separate processes. SYNOPSIS use Benchmark::Forking qw( timethis timethese cmpthese ); timethis ($count, "code"); timethese($count, { Name1 => sub { ...code1...

DateSep 27, 2010

AuthorBenchmark::Forking team

Size6.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Sort::Half::Maker is a Perl module to create half-sort subs easily.

DateSep 8, 2010

AuthorAdriano R. Ferreira

Size4.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Sub::PatMat can call a version of subroutine depending on its arguments.

DateSep 22, 2010

AuthorAnton Berezin

Size14.3 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming