precedence of stderr and stdout

#!/usr/bin/perl 
open(STDOUT, ">>$Textfile") 
open(STDERR, ">>$Textfile") 
print "program running\n";
$final = join("+", $initial,$final)  #5
close (STDOUT);
close (STDERR);

Hi all, above is my perl code. Notice i have captured the stdout and stderr to the same textfile. my code is expected to generate an perl error "Use of uninitialized value in join or string at 5."

In my $Textfile, the error message is printed first before my "program running". Why is this so? i would have expected that "program running" first before the error message. since the print "program running" is before the concatenation operation.

Do perl print out the error messages before the standard output?
my perl -v is "This is perl, v5.8.0 built for i386-linux-thread-multi"

Read this link. It is not the exact answer, but will give ou a idea on what/where to look at.
link