Re: unlink question
[email protected] (ToddAndMargo via perl6-users) Thu, 9 Oct 2025 20:46:26 -0700
| Newsgroups | perl.perl6.users |
|---|---|
| Message-ID | <[email protected]> |
On 10/9/25 7:40 PM, William Michels wrote:
> https://unix.stackexchange.com/questions/749558/remove-exact-line-from-
> file-if-present-leave-the-rest-of-lines-error-handling/749581#749581
>
> Try the `unlink` line from the U&L StackExchange link above.
> (three-line backup code: `spurt` file to backup copy, `unlink` original,
> `copy` backup to original path location):
>
> `unlink("/path/to/original.txt".IO) if"/path/to/original_bak.txt".IO
> ~~ :e & :f;`
>
> HTH, Bill.
Hi Bill.
Thank you for the recommendation!
What I was after was why the first attempt
(if not ...) would randomly not work.
I have fixed the issue with my second attempt.
-T