intoperl has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks, I want perl to NOT to display its own error messages, when i am handling it myself. Pls suggest me any way to suppress that. Below is the error messege i get from perl, followed by my own error message
Argument "hu" isn't numeric in numeric gt (>) at ./cpu_chk.pl line 120, <STDIN> line 3. ---->(Perl Error)
Bad Choice...Try again now.. ----> (my error msg)
The condition i have in my code is as below :
if(($SRVCH > 22)||($SRVCH < 1)||($SRVCH =~ /(\s+)/)||($SRVCH =~ /[a-z +A-Z]/)) { message("Bad Choice...Try again now.."); system("sleep 1.5"); disp_menu(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Suppressing Warning/Error messages
by Corion (Patriarch) on Aug 27, 2015 at 10:19 UTC | |
by intoperl (Acolyte) on Aug 27, 2015 at 10:29 UTC | |
by Corion (Patriarch) on Aug 27, 2015 at 10:32 UTC | |
by intoperl (Acolyte) on Aug 27, 2015 at 10:41 UTC |