use strict; use warnings; open my $fh, '>'. "testingwrite" or die; my $count = 20; while ($count--) { print $fh "count = $count\n"; sleep (5); } #### C:\Users\xxx\Documents\PerlProjects>handle testingwrite Nthandle v4.22 - Handle viewer Copyright (C) 1997-2019 Mark Russinovich Sysinternals - www.sysinternals.com perl.exe pid: 2488 type: File E8: C:\Users\xxx\Documents\PerlProjects\testingwrite C:\Users\xxx\Documents\PerlProjects>