Hi all, I have a 15 thousand directories - each of them contain say 10 files (all *.gzip) out of this 10 *.gz files - I want to check whether a file named foo.gz contain any content or not - since my files are gzipped even the blank file occupies some size.
have a look at my code ----------------------------------------- #!/usr/bin/perl use Shell; $dir = shift; $dir ="/home/trial"; opendir(M,"$dir"); @a = readdir(M); close M; open(KL,">Dumo-chk"); print KL " << List of foo.gz with no contents >> \n"; foreach (@a) { print"\n\t\tProcessing $_\n"; print"\tUncompressing and Readingfoo.gz\n"; next if ($_ =~ /^\./); # my code works fine untill here --- ------------------------------------ here i have the problem $dmchk=zless( "$dir/$_/foo.gz"); if (-z "$dmchk") { print KL "\n$_ No - content\n"; } else { print KL "$_ -foo-content\n"; } } - I am sure there is more than one day to do it - thanks in advance Happy PERL iBioKid - S K