Optimizing Perl script which looks for world-writable files
here are my suggestions:

Your hash %excludes would use less memory, if you would set the value to  undef instead of 1.

You could set $File::Find::prune=1 in those cases where the whole directory is to be excluded. This shortcuts the search for this directory.

You could also use the cached data of stat() afterwards like this -f _.

The regex should use anchors (faster and more robust).

Here is the revised wanted subroutine (untested).

sub wanted {
  my @dirStats = stat($File::Find::name);

  # Is it excluded from the report...
  if (exists $excludes{$File::Find::name}) {
    $File::Find::prune=1 if (-d _);
    return;
  }

  # ...in a basic directory, ...
  if ($File::Find::name =~ /^\bsys\b|\bproc\b|\bdev\b$/) {
    $File::Find::prune=1 if (-d _);
    return;
  }

  # ... not a regular file, ...
  return unless -f _;

  # ...local, ...
  return if (exists $devNums{$dirStats[0]});

  # ...and world writable?
  my $protection = $dirStats[2];
  my $writemask = (S_IWUSR | S_IWGRP | S_IWOTH);
  return unless $writemask == $protection &amp; $writemask;

  # If so, add the file to the list of world writable files
  print(WWFILE "$File::Find::name\n");

}