I am receiving some very weird errors from the Perl-based UBB code that was recently moved to a machine running redhat-7.0 and perl 5.6.0, from redhat-6.2 with perl 5.00503. I've narrowed the problem down to the following small snippet of code: #! /usr/bin/perl $maxfields = 14; sub OpenFile { my $FilePath = shift; my @thisarray = []; if (-e "$FilePath") { open (THISONE, "$FilePath") or die( &StandardHTML("OpenFile $FilePath failed: $!<p>Check Paths & Permissions") ); @thisarray = <THISONE>; close (THISONE); } else { @thisarray = ""; } return(@thisarray); } @f = OpenFile ( "test" ); print "count=$#f\n"; print "@f"; while(1) { @fields = OpenFile ( "test" ); $count = $#fields; if ( $count > $maxfields ) { print "Fields exceeded $count>$maxfields\n"; } } Where the file "test" contains: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 The code will occasionally print out 'Fields exceeded 13>14', which is simply ludicrous :)
Tried the same code on a freebsb box, running perl 5.6.0, and it works fine.
Dropped perl-5.6.0-11.i386.rpm onto the system (from fisher), and the problem goes away.
Could not recreate the problem using the sample code with perl-5.6.0-11. User has stated this version also fixes the problem for him. Closing the report.