Re: Test if string does not exist in an array.

2007-07-27 Thread snickwad
Thanks for the resonses and apologies for the lack of script, and the glaring typo : The area of code for the test is currently - open(ULIST,"/etc/passwd") or die "Could not open /etc/passwd"; @udata=; close(ULIST); sub check_details { return 1 if (grep(/$user/,@udata)); } So the script is co

Test if string does not exist in an array.

2007-07-26 Thread snickwad
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 str