473,388 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Getting error & warnings messages from PERL PRG

Hi,

I want to get the error & warnings messages from program.
like fatal error, variable declaration error in strict mode & etc..
is it possible in perl? plz give your suggestions.

Thanks
Vijay
Dec 18 '07 #1
4 1365
eWish
971 Expert 512MB
Add these two lines to your code and they will enable the strict and warnings pragmas. Also look into using the die function when you are reading and writing files.

Expand|Select|Wrap|Line Numbers
  1. use strict;
  2. use warnings;
--Kevin
Dec 18 '07 #2
Thanks for your help.
but the problem is different.
I am starting a perl prog from cgi application. if i get any prob in perl prg(like variable declaration & fatal erro), i should show it to respective user.
so i have to take the error messages from perl prg & print it in cgi application.

Add these two lines to your code and they will enable the strict and warnings pragmas. Also look into using the die function when you are reading and writing files.

Expand|Select|Wrap|Line Numbers
  1. use strict;
  2. use warnings;
--Kevin
Dec 19 '07 #3
eWish
971 Expert 512MB
Show an example of the code you have tried and a better explaination of what you are wanting to do. I am still not clear. Unless you mean that you want to write a sub routine to handle the errors. Which would be simple. I guess that you could also mean that you want to use a module like CGI::Carp and print the errors to the screen.

--Kevn
Dec 19 '07 #4
numberwhun
3,509 Expert Mod 2GB
Show an example of the code you have tried and a better explaination of what you are wanting to do. I am still not clear. Unless you mean that you want to write a sub routine to handle the errors. Which would be simple. I guess that you could also mean that you want to use a module like CGI::Carp and print the errors to the screen.

--Kevn
And in that module that Kevin mentioned, you would want to look at the "FatalsToBrowser" piece.

Regards,

Jeff
Dec 19 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
14
by: kosuke | last post by:
I keep getting the following error/warning message when using the python based program getmail4: /usr/lib/python2.3/optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will return a...
1
by: qwelk179 | last post by:
I obtained checklink v4.4 from: http://validator.w3.org/docs/checklink.html Using ActiveState Perl 5.8.4 build 810 on Windows 2000 SP4, I ran the script. (I first had to remove the T option...
15
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
8
by: Brian Tkatch | last post by:
Server: DB2/SUN 8.1.6 Client: DB2 Connect Personal Edition (No 11) <URL:ftp://ftp.software.ibm.com/ps/products/db2/fixes2/english-us/db2winIA32v8/fixpak/FP11_WR21365/FP11_WR21365_CONPE.exe> ...
1
by: sshankar | last post by:
Hi, New to Stored procedure. Basically just installed DB2 v8.1.0.36 Was trying to build a stored procedure.. It is giving following error.. Looks like some error related to configuration...
12
by: arnuld | last post by:
this is exercise 2-3 from the mentioned section. i have created a solution for it but i see errors and i tried to correct them but still they are there and mostly are out of my head: ...
3
by: patelxxx | last post by:
PERL Code to Ping a server: #!c:/Perl/bin/perl.exe use Net::Ping; use strict; use warnings; my $host = 192.168.0.1; # Real value removed by MODERATOR
2
by: erbrose | last post by:
Hey friends i just wrote some code that finds a zip file in a folder, unzips it using system() call to winzip32.exe. the contents of zip is an oracle dmp file. I next use another system() call to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.