Re: I am getting flooded with tmp files

2024-11-18 Thread ToddAndMargo via perl6-users
On 11/18/24 21:04, Bruce Gray wrote: On Nov 18, 2024, at 22:49, ToddAndMargo via perl6-users us...@perl.org> wrote: On 11/18/24 20:06, ToddAndMargo via perl6-users wrote: I am getting flooded with tmp files.  I though I was erasing them (unlink).  What am I doing wrong: use File::Temp; ... m

Re: I am getting flooded with tmp files

2024-11-18 Thread Peter Scott
Something in your program is keeping them open until your program closes the filehandles on exit.  Unlink can't remove a file that's open, only make a note for later. Restricting the scope of the temp file handles would probably be the cleanest way. On 11/18/2024 8:49 PM, ToddAndMargo via per

Re: I am getting flooded with tmp files

2024-11-18 Thread ToddAndMargo via perl6-users
On 11/18/24 20:06, ToddAndMargo via perl6-users wrote: I am getting flooded with tmp files.  I though I was erasing them (unlink).  What am I doing wrong: use File::Temp; ... my Str $TmpFile = $?FILE; $TmpFile ~~ s| .* $( Q[/] ) ||;  # we need just the name $TmpFile ~~ s| $( Q[.] ) .* ||; ($Tmp

I am getting flooded with tmp files

2024-11-18 Thread ToddAndMargo via perl6-users
I am getting flooded with tmp files. I though I was erasing them (unlink). What am I doing wrong: use File::Temp; ... my Str $TmpFile = $?FILE; $TmpFile ~~ s| .* $( Q[/] ) ||; # we need just the name $TmpFile ~~ s| $( Q[.] ) .* ||; ($TmpFile, $TmpHandle) = tempfile(:tempdir("."), $TmpFile ~ "