in reply to User management system: update problem

Hi, just had a quick look over it. Is there a reason why you sometimes use <> and sometimes <STDIN> to read in? You should know that <> is not exactly the same as <STDIN> because it will also try to read from filenames given in @ARGV, but I'm not sure what order right now. Anyway a s/<>/<STDIN>/ might make your code more consistent, and reduce the chance for buggy behavior if someone calls your script with arguments.

Martin

  • Comment on Re: User management system: update problem

Replies are listed 'Best First'.
Re^2: User management system: update problem
by mscharrer (Hermit) on Apr 17, 2008 at 09:13 UTC
    and some other general tips:

    You can write your beginning lines like this:

    print "\n"x7, '-'x80, "\n"; print "Welcome to Jamie's User Management System. \n\n" . "Please select the option that you wish to use:\n" . " -a -- To create a new username and password.\n" . " -u -- To update a users password.\n" . " -d -- To delete a user from the system.\n" . " -h -- For more help!\n\n" . " -q -- To quit this system\n\n";
    The usage of the program 'perltidy' (from inside vim with :%!perltidy) can improve the readability of your scripts. I'm using it a lot.