in reply to Getting Next Available Userid

my $max = 0; while (my @one = getpwent) { $max = $one[2] if $max < $one[2]; } print $max + 1, "\n";

-- Randal L. Schwartz, Perl hacker