I have been getting a version of your error a lot myself lately. What's been happening with my logic is, I'm sending the perlscript a NULL value at some point. NULLs are read as undefined. What you should try doing is have a conditional where you deal with any variables whose value is undefined.

For example, in one section of my code I'm looping through an array of data and comparing each line of the array to an array of keywords. Some lines in the array are empty, which are read as undefined. I want to skip over any empty lines and continue to the next line in the array. The code I used is:

next unless defined $textarea;

Hope this helps.

-- Craig

Waghmare, Satish (IE03x) wrote:

Hello Friend,
I am using Active Perl 5.8. I am facing one problem with my PERL script.
Following is the error I'm getting when I ran my Perl script which makes use of hash tables.
Use of uninitialized value at updatesalesmaster.pl line 655, <FILE> chunk 1282.
Use of uninitialized value at updatesalesmaster.pl line 682, <FILE> chunk 1282.
Use of uninitialized value at updatesalesmaster.pl line 685, <FILE> chunk 1282.
Use of uninitialized value at updatesalesmaster.pl line 685, <FILE> chunk 1282.
Use of uninitialized value at updatesalesmaster.pl line 685, <FILE> chunk 1282.
Use of uninitialized value at updatesalesmaster.pl line 685, <FILE> chunk 1282.
Use of uninitialized value at updatesalesmaster.pl line 685, <FILE> chunk 1282.
Use of uninitialized value at updatesalesmaster.pl line 685, <FILE> chunk 1282.
Use of uninitialized value at updatesalesmaster.pl line 685, <FILE> chunk 1282.
Use of uninitialized value at updatesalesmaster.pl line 685, <FILE> chunk 1282.
Use of uninitialized value at updatesalesmaster.pl line 693, <FILE> chunk 1282.
*Code Snippet in the script:-*
Here i'm making use of hash tables to get the value using key.
$pcode = $ytdsapprod{$region.$arr[$lprdcode]};
$lcode = $ytdsaplocn{$region.$arr[$lloccode]};
$descode = $ytdsapdest{$region.$arr[$ldescode]};
** *These are lines which referred in error:-*
*__* *_line no._ _Code on that Line_*
655 if($descode !~ /#N\/A/ && $arr[$dvcode] !~ /#N\/A/ &&
682 if(exists $mkt_do{$descode}) {
685 print DOERR join(' ',$descode,$mkt{$descode},$pcode ,$arr[$pname],
$mkt_dist{$descode},$district{$mkt_dist{$descode}}),"\n";
693 if(exists $district{$mkt_dist{$descode}} && $arr[$dvcode] !~ /NA/) {
Please help in resolving this Error so that I can run the script successfully.
Thanks in advance
Regards
*_Satish_*



------------------------------------------------------------------------


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

--



Craig Cardimon, Programmer AUS Inc. (Knowledge Express Data Systems; 1-800-529-5337, ext. 24) _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to