redhotchippyleper has asked for the wisdom of the Perl Monks concerning the following question:
So from this whenever the result is 1 (succesfully mapped to target c: drive) then perform the find subroutine. If a .pst file is found stick it in a log file with its location and size. There are other parts but this is the main thing. Now this is sweet with 5.2.1 but with 5.6.1 It succesfully searches against the first PC but any subsequent PCs it only searches against the first 5 files in the target directory, then ends, and goes to the next PC and so on. I also had another issue that with 5.6.1 it does not populate the @ARGV array at all. Most annoying but can workaround that. Any ideas on that one. Maybe we have a duff install of 5.6.1 on our distribution server (not allowed to dload anything either).. . . if ($MapResult == 1){ find (\&pstFind, $dir); }elsif ($MapResult == 0){ push @missedEntry,$PCName; }#end if . . . sub pstFind{ print "\n** Test Line **\n"; if (/\.PST$/ || /\.pst$/){ my $entry = "$PCName"." $File::Find::dir"."/$_\n"; my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $theres +t) = stat($_) or die "Unable to stat $_\n"; chomp $entry; $entry = "$entry" . " = $size bytes\n"; $ByteCount += $size; print "$entry\n"; open (OUTFILE, ">> $outfile"); print OUTFILE $entry; close OUTFILE; }# end if }#end sub . . .
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with Find (classic)
by tye (Sage) on Nov 17, 2006 at 18:29 UTC | |
by redhotchippyleper (Novice) on Nov 20, 2006 at 16:38 UTC | |
|
Re: Problem with Find
by GrandFather (Saint) on Nov 17, 2006 at 17:59 UTC | |
|
Re: Problem with Find
by MonkE (Hermit) on Nov 17, 2006 at 17:35 UTC | |
by redhotchippyleper (Novice) on Nov 17, 2006 at 17:48 UTC | |
|
Re: Problem with Find
by MonkE (Hermit) on Nov 17, 2006 at 18:00 UTC | |
by GrandFather (Saint) on Nov 17, 2006 at 18:16 UTC |