in reply to Redirecting perl output on the command line

Another quick solution is to write to STDERR directly
=================================== #!/usr/bin/perl -w use strict; print STDERR "Begin...\n"; for ( my $i = 0; $i < 5; $i++ ) { print STDERR "$i...\n"; sleep 2; } ===================================

$ ./populate.pl 2> data.txt& (assumes bourne shell or bash)
STDERR is unbuffered, so you get the behavior you expect