Rob.Savino wrote:
> I'm working on a simple script to get a list of users who do not exist
> 
> while (<>) {
>       $user = system("echo $_");
>       $result = system("dsquery user -samID $_");
> }
> if (!$result) {
>       print "$user\n";
> }
> 
> Here is my problem,
> 
> dsquery user -samID should return nothing if a user does not exist. I
> was hoping the script would print $user only if there was no $result
> from dsquery user -samID. However, not only does it print every $user
> regardless of the was not $result, it also prints every $result.
> 
> Can someone tell me why this is?

perldoc -q "output of a command"

http://danconia.org

> 
> Thanks,
> 
> Rob
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to