in reply to Unable to read files from a directory
open(MYFILE,"C:/Perl/bin/Anti/$file") or die "Count open file :$!";
to
open(MYFILE,"C:/Perl/bin/Anti/$file") or die "Count open file $file:$!";
and that will uncover your culprit.
In a side note, you have a serious potential security issue by using the two-argument form of open in this context. If there is a maliciously named file in your directory of interest, this script can be made to run arbitrary code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unable to read files from a directory
by GrandFather (Saint) on May 14, 2009 at 03:12 UTC | |
|
Re^2: Unable to read files from a directory
by antidote1316 (Initiate) on May 14, 2009 at 03:14 UTC |