shounak mukherjee has asked for the wisdom of the Perl Monks concerning the following question:
Hello Experts,
I am new to perl programming and facing a few issues related to perl regular expressions. I need to apply a condition logic only if my $filename is something like:
$filename =._foo.xml #Any file that starts with ._"
For such files,I need to overlook the content of the file.
while( ($fileName = readdir(DIR))) {
next if ($fileName eq "^\._.*");
However I think this regular expresion is not able to filter the filenames based on the criteria. I shall be highly obliged if anyone can please help.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Issue with regex
by choroba (Cardinal) on Jun 23, 2017 at 15:50 UTC | |
Re: Issue with regex
by CountZero (Bishop) on Jun 24, 2017 at 09:21 UTC |
Back to
Seekers of Perl Wisdom