Using the code below how would I modify it so that only one file gets processed at a time. Meaning make the script wait until file1 is done with the removal/backup/deletion before it starts with file2? thanks again for the help
#!/usr/bin/perl
use warnings;
use strict;
use File::Find;
@ARGV == 1 or die "usage: $0 directory_name\n";
my @files;
find sub {
if ( -f and /^33dc01\..*outer\.log$/ ) {
push @files, $File::Find::name;
print "$File::Find::name\n";
}
}, $ARGV[ 0 ];
( $^I, @ARGV ) = ( '', @files );
while ( <> ) {
next if $. <= 4;
print;
close ARGV if eof;
}
|