in reply to calling regular expressions returned by functions?

I realize this doesn't answer your question directly, but File::Slurp::read_dir automatically excludes the dot dirs for you. This is equivalent to your code:
use warnings; use strict; use Data::Dumper; use File::Slurp; my @lst = read_dir('.'); print Data::Dumper->Dump([\@lst], [qw/lst/]);

Replies are listed 'Best First'.
Re^2: calling regular expressions returned by functions?
by Anonymous Monk on Mar 29, 2012 at 18:35 UTC

    Thanks! That is good to know.

    However, I'm most interested in figuring out the syntax needed to move regular expressions to constants. My Perl foo is weak.

    Thanks, again for responding. Maybe my foo isn't quite as weak now...