Re: finding out what is uninitialized

2004-08-04 Thread Tim McGeary
A little merging of this new sample file and my whole file and it works like a charm! Thank you all for teaching me some new tricks. I'm happier with perl now. :) Special thanks to Charles. Tim Tim McGeary Senior Library Systems Specialist Lehigh University 610-758-4998 [EMAIL PROTECTED] Ch

Re: finding out what is uninitialized

2004-08-04 Thread Tim McGeary
Thank you, Charles. I appreciate that! Just by reading through your re-write, I'm learning a bunch more! Tim Tim McGeary Senior Library Systems Specialist Lehigh University 610-758-4998 [EMAIL PROTECTED] Charles K. Clarkson wrote: From: Tim McGeary wrote: : I don't g

RE: finding out what is uninitialized

2004-08-03 Thread Charles K. Clarkson
From: Tim McGeary wrote: : I don't get any errors either with the sample.pl and : sample files. So I wonder if the data is bad in the : middle of the file. I guess that has to be it since : I get the errors with sample.pl and the full data file. : : What is the best w

Re: finding out what is uninitialized

2004-08-03 Thread Gunnar Hjalmarsson
Tim McGeary wrote: I don't get any errors either with the sample.pl and sample files. So I wonder if the data is bad in the middle of the file. I guess that has to be it since I get the errors with sample.pl and the full data file. There is no way line 136 can result in an "uninitialized" warning

Re: finding out what is uninitialized

2004-08-03 Thread Tim McGeary
I don't get any errors either with the sample.pl and sample files. So I wonder if the data is bad in the middle of the file. I guess that has to be it since I get the errors with sample.pl and the full data file. What is the best way to redirect that bad data to a different file or array? Tim

RE: finding out what is uninitialized

2004-08-03 Thread Charles K. Clarkson
Charles K. Clarkson wrote: : From: Tim McGeary wrote: : : : I am still having an error, though. Should I send my full : : data file? It's a bit large. : : Send it to me off-list. After receiving the file I get three errors. Which, a

RE: finding out what is uninitialized

2004-08-03 Thread Charles K. Clarkson
From: Tim McGeary wrote: : I am still having an error, though. Should I send my full data : file? It's a bit large. Send it to me off-list. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

Re: finding out what is uninitialized

2004-08-03 Thread Tim McGeary
I am still having an error, though. Should I send my full data file? It's a bit large. Tim Tim McGeary Senior Library Systems Specialist Lehigh University 610-758-4998 [EMAIL PROTECTED] Charles K. Clarkson wrote: Tim McGeary <[EMAIL PROTECTED]> wrote: : The blank line was my mistake of pulling a

RE: finding out what is uninitialized

2004-08-03 Thread Charles K. Clarkson
Tim McGeary <[EMAIL PROTECTED]> wrote: : The blank line was my mistake of pulling a limited amount : of data. There is no blank line at the end of my real : data file. Then there is also no error. So, what's your question? : Charles K. Clarkson wrote: : : From: Tim McGeary

Re: finding out what is uninitialized

2004-08-03 Thread Tim McGeary
The blank line was my mistake of pulling a limited amount of data. There is no blank line at the end of my real data file. Tim McGeary Senior Library Systems Specialist Lehigh University 610-758-4998 [EMAIL PROTECTED] Charles K. Clarkson wrote: From: Tim McGeary wrote:

RE: finding out what is uninitialized

2004-08-03 Thread Charles K. Clarkson
From: Tim McGeary wrote: : Here are two sample data files and the full script : minus a bunch of comments that aren't needed.. When I ran the sample.pl script I got this. The errors can be eliminated by deleting the blank line in sample.txt. I didn't get any er

Re: finding out what is uninitialized

2004-08-03 Thread Tim McGeary
Here are two sample data files and the full script minus a bunch of comments that aren't needed.. Thanks, Tim Tim McGeary Senior Library Systems Specialist Lehigh University 610-758-4998 [EMAIL PROTECTED] Charles K. Clarkson wrote: From: Tim McGeary wrote: : Ok, here's

RE: finding out what is uninitialized

2004-08-03 Thread Charles K. Clarkson
From: Tim McGeary wrote: : Ok, here's the code that is pushing $cat_key, $title, : $url, and $code into the @fund_array: : : @sirsi_array has a DB_key, a Title and "data" which : is either a code or a URL, in such a manner: : : 101|Journal of Nature|PBIO| : 101|Journa

Re: finding out what is uninitialized

2004-08-03 Thread Gunnar Hjalmarsson
[ Please type your replies below the quoted part of the message you respond to. Please only quote what's needed to give context. ] Tim McGeary wrote: Gunnar Hjalmarsson wrote: Before digging into it, and so we know which problem we are helping you to solve: *Is* the warning referring to the push()

Re: finding out what is uninitialized

2004-08-03 Thread Tim McGeary
No, the warning statement is when I'm printing to the file. In both case, it refers to the process of writing to a file from the foreach $item (@fund_array) process. Tim Tim McGeary Senior Library Systems Specialist Lehigh University 610-758-4998 [EMAIL PROTECTED] Gunnar Hjalmarsson wrote: Tim Mc

Re: finding out what is uninitialized

2004-08-03 Thread Gunnar Hjalmarsson
Tim McGeary wrote: Ok, here's the code that is pushing $cat_key, $title, $url, and $code into the @fund_array: Before digging into it, and so we know which problem we are helping you to solve: *Is* the warning referring to the push() statement? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-

Re: finding out what is uninitialized

2004-08-03 Thread Tim McGeary
Ok, here's the code that is pushing $cat_key, $title, $url, and $code into the @fund_array: @sirsi_array has a DB_key, a Title and "data" which is either a code or a URL, in such a manner: 101|Journal of Nature|PBIO| 101|Journal of Nature|http://www.nature.org/| 102|Journal of Crap|PBIO| 102|Jo

Re: finding out what is uninitialized

2004-08-03 Thread Script Monkey
Good point. Tim, how are $cat_key, $title, $url, and $code being populated? SM On Aug 3, 2004, at 9:14 AM, James Edward Gray II wrote: On Aug 3, 2004, at 9:12 AM, Gunnar Hjalmarsson wrote: where the @fund_array is defined by : push(@fund_array,"$cat_key\|$title\|$url\|$code\|"); If that's the o

Re: finding out what is uninitialized

2004-08-03 Thread James Edward Gray II
On Aug 3, 2004, at 9:12 AM, Gunnar Hjalmarsson wrote: where the @fund_array is defined by : push(@fund_array,"$cat_key\|$title\|$url\|$code\|"); If that's the only way @fund_array gets populated, there is no way it can contain undefined elements. Is the warning pointing to the push() line though

Re: finding out what is uninitialized

2004-08-03 Thread Gunnar Hjalmarsson
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) {

Re: finding out what is uninitialized

2004-08-03 Thread Tim McGeary
So if I don't have this, what is printed to my file? Nothing? Just an error to the screen? What I don't understand is that if the data wasn't there, I wouldn't have pushed it to the array previously. And I've gone over that code in depth and everything is being set before it's push together

Re: finding out what is uninitialized

2004-08-03 Thread Script Monkey
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,