in reply to Gracefull completion..
you should have:open (PASSWD "+</.stickum.txt");
open (PASSWD, "+</.stickum.txt");
you might want to try"+</.stickum.txt"
That will open the file if it exists (without clobbering it) or create it if it doesn't exist. That way you can write to it."+>>/.stickum.txt"
you should have:print "What is the new passord?\n"; feistal($password);
Finally, a way to exit gracefully: rewrite sub userprint "What is the new passord?\n"; $password = <STDIN>; feistal($password);
try this:sub user{ print "Account name:\n"; while (<>){ $username=$_; chomp $username; &query; } } #corrected comile error
sub user{ print "Account name: "; $username = <STDIN>; while ($username == ""){ print "Account name: "; $username = <STDIN>; } &query }
|
|---|