Re: need native call help

[email protected] (ToddAndMargo via perl6-users)
Newsgroups perl.perl6.users
Message-ID <[email protected]>
On 4/17/24 19:10, William Michels via perl6-users wrote:
> Hi Todd,
> 
> Here are a few U&L StackExchange answers that I wrote using Raku's `unlink`:
> 
> https://unix.stackexchange.com/questions/459521/how-to-truncate-file-to-maximum-number-of-characters-not-bytes/751267#751267
> 
> https://unix.stackexchange.com/questions/749558/remove-exact-line-from-file-if-present-leave-the-rest-of-lines-error-handling/749581#749581
> 
> (Suggestions welcome).


Hi William,

unlink($_) if $bak.IO:e & $bak.IO:f;

Interesting!  Thank you.

The problem is that you can not implicitly trust
the file operations when programming on the kluge.
Linux, no problem.

I wish I had more Linux customers, but I do not.

-T

I do not know if you are, but I just append .tmp or .bak on to the name 
of my program.   I have never used Kernel32::GetTempTileNameA.

https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettempfilenamea
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.