Here is what I do for uninitialized  variables:

foreach $coded (@fund_array) {
        if (defined($coded) {
                printf (FILE "$coded\n");
        }else{
                printf(FILE,"\n");
        }

}

or drop off the else statement if you don't want the blank line.

Rod,



On Aug 3, 2004, at 8:48 AM, Tim McGeary wrote:

I have two arrays that I am printing to a file and I get the "Use of uninitialized value..." warning. But I get that for less than 100 of 3000+ lines. Is there a way that I can log what data is uninitialized. Here's the snippet of code I am using:

foreach $coded (@fund_array) {
   printf (FILE "$coded\n");
}

where the @fund_array is defined by :
   push(@fund_array,"$cat_key\|$title\|$url\|$code\|");

I can't for the life of my figure out why I am getting this error for only a handful.

TIA,
Tim

--
Tim McGeary
Senior Library Systems Specialist
Lehigh University
610-758-4998
[EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



http://www.iowatelecom.net/~rodj/key.txt


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to