use strict; use warnings; my $user = 'root'; my $chk_user = `ypmatch $user password 2>&1`; print "Results of 'ypmatch' for user '$user' => '$chk_user'\n";