Below is my script that read the content of flow
directory..I want to delete each file after
reading..But it failed...What's the problem?...can
anyone help me ...
#!/usr/bin/perl
use strict;
use warnings;
use DBI;
use DBD::mysql;
my $dir="/flow/";
my @files;
my $file;
my $record;
my @log;
my $packet;
my $counter = 0;
my $file_array;
my @flow;
my @line;
my $sth;
opendir(FILE, $dir) || die("Cannot open directory");
@files= readdir(FILE);
closedir(FILE);
foreach $file(@files)
{
unless ( ($file eq ".flow") || ($file eq "..") )
{
print "\n$file\n";
}
unlink($file) || warn "having trouble deleting $file:
$!";
}
Regards
Roime
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>