Charlene Gentle wrote:
Hi
Hello,
This is what I'm using to find the file. .I still can't delete the
file
perldoc -f unlink
or replace it with the file I created.
perldoc File::Copy
se strict;
use File::Find;
use CGI qw(:standard);
my $query = param("Toetsss");
undef $/;
find( sub
{
return if($_ =~ /^\./);
return unless($_ =~ /Toetsss.txt/i);
stat $File::Find::name;
return if -d;
You are stat()ing the same file a second time.
return unless -r;
You are stat()ing the same file a third time.
Use the _ special filehandle to avoid stating the same file more than once.
stat;
return if -d _;
return unless -r _;
open(FILE, "< $File::Find::name") or return;
my $string = <FILE>;
close (FILE);
print "$File::Find::name\n";
},
'c:\Documents and Settings');
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>