in reply to crypt help
It's not clear to me how you're getting the results you describe. There are several problems with your code, however.
The principal one is that you never use your crypted $passc. What you're saving is the clear text. The file you save it to should not be opened with '>' mode, but '>>', or, better, '+<' so you can read the file and check for duplicated user names. File locking would also be wise.
You can call next in the read loop if the $user doesn't match, and last out of the loop once you find the entry for $user and compare crypts. That will let you avoid some unnecessary work.
chomp before split and after reading from STDIN to remove line ends which will wreck comparisons.
After Compline,
Zaxo
|
|---|