S
Simon
Hi guys, bit of a newbie here.
Im trying to learn error handling in perl.
Here are a couple of scenarios.
Im trying to write messages to the terminal/screen and output these over
operating system returned error messaages.
============================================================================
use Win32;
print `ipconig` || die "no good";
----------------------------------------- output is:
C:\Test>alright.pl
'ipconig' is not recognized as an internal or external command,
operable program or batch file.
no good at C:\Test\alright.pl line 4.
Why isnt it the following?
no good
============================================================================
C:\_Test>Connect.pl
hi thereSystem error 1326 has occurred.
Logon failure: unknown user name or bad password.
!Error Connecting!
Please check the workstation name and/or password!
C:\_Test>Connect.pl
hi thereSystem error 1326 has occurred.
Logon failure: unknown user name or bad password.
!Error Connecting!
Please check the workstation name and/or password!
Instead of the operating system reprorting these messages, I want to hide
these and generate my own.
Any help appreciated.
Im trying to learn error handling in perl.
Here are a couple of scenarios.
Im trying to write messages to the terminal/screen and output these over
operating system returned error messaages.
============================================================================
use Win32;
print `ipconig` || die "no good";
----------------------------------------- output is:
C:\Test>alright.pl
'ipconig' is not recognized as an internal or external command,
operable program or batch file.
no good at C:\Test\alright.pl line 4.
Why isnt it the following?
no good
============================================================================
C:\_Test>Connect.pl
hi thereSystem error 1326 has occurred.
Logon failure: unknown user name or bad password.
!Error Connecting!
Please check the workstation name and/or password!
C:\_Test>Connect.pl
hi thereSystem error 1326 has occurred.
Logon failure: unknown user name or bad password.
!Error Connecting!
Please check the workstation name and/or password!
Instead of the operating system reprorting these messages, I want to hide
these and generate my own.
Any help appreciated.