in reply to User management system: update problem

$fh =~ s/$inputline3/$encryptpw3/g;

This line doesn't do anything useful. $fh is a file handle, not a string - you can't substitute anything in a file handle.

And even if you could, the file is opened for reading only.

Use Tie::File if you want read- and write access to a file at the same time.