in reply to Some one help me with this code.how to make it work.
You declare the %database hash, then open a file in read/append mode and print the hash to the file handler. But %database has just been defined and has not been populated at this point, so that you are printing empty content to the file (besides the fact that printing directly a hash to a file might not be the best).# ... my %database; my @employee_details; my @mykeys; open(FH,"+>>database.txt")|| die 'Cannot open the file'; print FH %database; close FH;
Similarly, the elsif block ("get") does not make more sense.
Also I would strongly advise you to indent your code properly. This is very important for understanding the logic of a program.
|
|---|