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
In reply to Re: Press enter to exit
by McA
in thread Press enter to exit
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |