in reply to Press enter to exit
Hi
as always, put this on top of your script:
use strict; use warnings;
and you get the first hints for your error.
Anyway: When you chomp the input, the line seperator is removed. So, when someone is hitting enter without providing some text, the string is empty. So check against an empty string.
exit if $fi eq '';
Best regards
McA
|
|---|