Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
langperl
sub count_virtual_users {
  my $result = 0;
  local $/ = ":";
  open( PASSWD, "<", "/etc/passwd");
  while (<PASSWD>) {
    @items = split "\n";
    foreach (@items) {
      if ($_ eq "/usr/bin/false") {
        $result++;
      }
    }
  }
  $result;
}

Exceptions

DCL02-PL-EX0: The following global variables may be modified without being declared local:

...