Apologies if this is a bit noobie, but I have been left with a short
window to write a tool and I have had no experience with Perl. Very
familiar with Kornshell, and so far my Perl script is going okay.
However, I am struggling to get a test working correctly. Is there a
simple way to test if a string does not exist in an array?

I am trying to test if some user input (a userid) is valid and error
if it does not exist. Currently have the contents of /etc/passwd in an
array, and can test for valid users, but all my efforts to test for
invalid have failed miserably.

I am on AIX, not sure on the Perl version.

Current test for valid is :

return 1 if (grep(/$user/,$udata));

Any help would be much appreciated.

Ashley


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


Reply via email to