473,770 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error : Use of uninitialized value in string at perl25.plx

34 New Member
Hi All,

I have the following code.

The array @sub_data will contain integers or a string"NO". I have to validate if the array contain integer. If it contain "NO" then no need to validate.

for ($i=1;$i<10;$i+ +)
{
Tie::CheckVaria bles->on_error(sub{p rint "ERROR!"});
tie my $data,'Tie::Che ckVariables','i nteger';
$data = $sub_data[$i];

if ("$data" ne "NO") {

if (($data < $firstVar) || ($data > $secVar))
{
#print " the subscriber $subph dosnot have valid data field $sub_fld .\n";
$erracur = 1;
}

} else {
print "NO";
}
}


I am getting following error.

Use of uninitialized value in string at perl25.plx line 269.
Use of uninitialized value in numeric lt (<) at perl25.plx line 273.
Use of uninitialized value in string at perl25.plx line 269.
Use of uninitialized value in numeric lt (<) at perl25.plx line 273.
ERROR!ERROR!



If any thing wrong please let me Know.


Regards
Naveen
Apr 26 '07 #1
2 7015
KevinADC
4,059 Recognized Expert Specialist
those are warnings, not errors. The problem is probably in here:

Expand|Select|Wrap|Line Numbers
  1. $data = $sub_data[$i];
  2.  
  3. if ("$data" ne "NO") {
  4.  
  5. if (($data < $firstVar) || ($data > $secVar))

$data must not be getting defined which means $sub_data[$i] must not be defined. Print $data to the screen as the script runs to check its value. Did you get Tie::CheckVaria bles working?
Apr 26 '07 #2
pnsreee
34 New Member
those are warnings, not errors. The problem is probably in here:

Expand|Select|Wrap|Line Numbers
  1. $data = $sub_data[$i];
  2.  
  3. if ("$data" ne "NO") {
  4.  
  5. if (($data < $firstVar) || ($data > $secVar))

$data must not be getting defined which means $sub_data[$i] must not be defined. Print $data to the screen as the script runs to check its value. Did you get Tie::CheckVaria bles working?

Hi kevin,

I got working Tie::CheckVaria bles .

The array @sub_data have to empty fields.So I got that warning message.

Now i solved It.
Thanks for your help.

Regards
Naveen
Apr 27 '07 #3

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

Similar topics

1
14158
by: G Kannan | last post by:
Hey all! I have written a perl script to retrieve information from a HTML Form and insert the data into an Oracle database table. I am gettting the the following error message: "Use of uninitialized value in concatenation (.) at register.pl line 38, <STDIN> line 10." The PERL code is as follows:
1
15537
by: rk | last post by:
Hi, I'm a beginner for perl/cgi programs and i tried to write a cgi script and when i ran it, i got the following error. But when i verified it from the book i typed exactly whatever it is there and i checked other examples too. I did't get any clue.Can someone please help me on this. #!/usr/bin/perl use warnings;
2
5620
by: Liang | last post by:
Hi, I use "defined $r_libs->{$name}" to check first if a key exists in a hash table. But Perl gives a warning WHENEVER the key exists: "Use of uninitialized value". Would u please help to check the script, and let me know the reason? Thanks in advance. Liang
2
4576
by: Michael | last post by:
I need some help. I have the following code: cmSQL = New SqlCommand("nf_AddPurchaseOrder", cnSQL) cmsql.CommandType = CommandType.StoredProcedure cmsql.Parameters.Add("@PurchaseOrderId", sqldbtype.varchar, 10, "OrderNo").Value = txtPONum.Text cmsql.Parameters.Add("@OrderDesc", sqldbtype.VarChar , 50 , "OrderDesc").Value = txtOrderDescription.text cmsql.Parameters.Add("@SupplierId", sqldbtype.Int , "SupplierId").Value = s.SupplierId...
7
29436
by: supachamp | last post by:
Hi everybody, I am having great problems with the following classes. I just can't figure out why I keep getting the error message: Building file: ../edge.cc Invoking: GCC C++ Compiler g++ -O0 -g3 -Wall -c -fmessage-length=0 -oedge.o ../edge.cc .../edge.cc: In constructor `Edge::Edge(Vertex&, Vertex&)': .../edge.cc:4: error: uninitialized reference member `Edge::v0'
6
4272
by: samthemist | last post by:
When perl comes out with errors like this: Use of uninitialized value in concatenation (.) or string at NQII.pl line 18, <STDIN> line 2. Argument "" isn't numeric in numeric ne (!=) at NQII.pl line 342, <STDIN> line 2. Argument "neopets.com/hi.phtml" isn't numeric in numeric ne (!=) at NQII.pl line 342, <STDIN> line 2. Argument "POST" isn't numeric in numeric eq (==) at NQII.pl line 343, <STDIN> line 2. Argument "POST" isn't numeric in...
2
4090
by: bprabhu17 | last post by:
Hello, Could some please help me fix this error. Use of uninitialized value in concatenation (.) or string at MQ.pm line 450. Thanks in advance
1
1773
by: cxyliu | last post by:
All, I met one issue when using perl in Apache. the following is my conf of httpd for perl usage: <Location /> PerlFixupHandler My_Filter </Location> Sometime, I met this error: Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8e-fips-rhel5 PHP/5.3.0 mod_qos/9.1 mod_perl/2.0.4 Perl/v5.8.8 configured -- resuming normal operations
1
3029
by: swkr | last post by:
I have the following code. const TCHAR * pTemp = X->Fn(index); X is an object of a class and Fn is a method in it which returns a const TCHAR *. Building this in Windows is fine, but not in linux. It throws an error as follows. error: uninitialized const in 'new' of 'const TCHAR'
0
9619
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9910
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.