Looks like you're "suffering from buffering".
Try turning buffering off by adding the following line before your print statement:
$|++;
Cheers,
Brent
In reply to Re: writing to a file using print
by dorko
in thread writing to a file using print
by Brad.Walker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |