in reply to File contents not updated properly

When we are execute some commands in perl, Automatically file content got flush.
Like below :
open(FH,">Sample");
while(1) {
print FH "This is for testing\n";
sleep 1;
`date`; -- Sample command
}