On Aug 29, 2012, at 3:07 PM, Wang, Li wrote: > Hi, John > > With the modified script, I got it work, but get some warnings when running > through one file. > > Use of uninitialized value in numeric ge (>=) at searchAndPrint.pl line 50, > <FST> line 3417. > Use of uninitialized value in numeric gt (>) at searchAndPrint.pl line 54, > <FST> line 3417. > Use of uninitialized value in numeric ge (>=) at searchAndPrint.pl line 50, > <FST> line 3417. > Use of uninitialized value in numeric gt (>) at searchAndPrint.pl line 54, > <FST> line 3417. > Use of uninitialized value in numeric ge (>=) at searchAndPrint.pl line 50, > <FST> line 3417. > Use of uninitialized value in numeric gt (>) at searchAndPrint.pl line 54, > <FST> line 3417. > ------ a lot of repetition > > Even with the warning, the output file is right, it gives me what I want. > > Could anyone suggest to remove the warnings? The FST file in total has 3416 > line. I donot know why the line 3417 comes from.
Maybe you have a blank line at the end of the file. You are not checking for this. You should check if the @dat array has at least three elements before trying to compare $dat[2] with anything. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/