#!/usr/bin/perl -w getpwnam("test") or warn "account doesn't exist yet... (expected)"; # code to add LDAP account here brings out problem # code to add to /etc/passwd account doesn't getpwnam("test") or warn "shouldn't see this but we do\n $!"; (system("chown test.test /tmp/file")==0) or warn "this also fails" # this works but is ugly warn `getent passwd | grep test`,"\n"; # $! eq 'No such file or directory'