CARVIEW |
Select Language
HTTP/2 200
cache-control: max-age=43200
server: Combust/Plack (Perl)
vary: Accept-Encoding
content-encoding: gzip
content-length: 2053
content-type: text/html; charset=utf-8
last-modified: Wed, 15 Oct 2025 21:48:58 GMT
date: Wed, 15 Oct 2025 21:48:58 GMT
strict-transport-security: max-age=15768000
Re: the new raku.org is really beautiful (and tought about spurt) - nntp.perl.org
Front page | perl.perl6.users |
Postings from September 2025
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About

Re: the new raku.org is really beautiful (and tought about spurt)
Thread Previous | Thread NextFrom:
William Michels via perl6-usersDate:
September 8, 2025 02:26Subject:
Re: the new raku.org is really beautiful (and tought about spurt)Message ID:
D636B050-A49A-4F2A-A724-E62FEAAE42BB@caa.columbia.eduGreetings, I much prefer this syntax: `~$ raku -e 'my $fh = "ImportantFile_bak".IO; #create filehandle \ "ImportantFile".IO.slurp.subst(:global, "Hello ", "Hi ") andthen spurt($fh, $_, :createonly);' ` It has a nice left-to-right feel and keeps you from clobbering an `ImportantFile`. ( Once you're sure of your code/filehandles, clobber-away by deleting `:createonly` ). HTH, Bill. PS If `Str` had a `spurt` method, wouldn't you be in constant fear of a sensitive string literal (e.g. a password) being accidentally written to disk? > On Sep 7, 2025, at 13:24, Elizabeth Mattijsen <liz@dijkmat.nl> wrote: > >> On 7 Sep 2025, at 20:31, Marc Chantreux <mc@unistra.fr> wrote: >>>> with "example.txt".IO.slurp { >>>> s/Hello/Hi/; >>>> .spurt: $filename; >>>> } >>> >>> Now *that* I find to be an interesting idea. The oneliner would then become: >>> >>> "example.txt".IO.slurp.subst("Hello","Hi").spurt($filename) >>> >>> which has a nice left-to-right feel. >> >> Which would be indeed my syntax of choice. > > Now a PR: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_rakudo_rakudo_pull_5949&d=DwIFAg&c=009klHSCxuh5AI1vNQzSO0KGjl4nbi2Q0M1QLJX9BeE&r=H_4IX2PNs5J8Am4L9k8XPDKLi8_PeuhJoKcQtnXHZ4c&m=CdwLh6ejqGtN5pVo5BxHnyw_NNX6Q3THBGda101VuhkyU9wfE4bILSaNb-FFWw5p&s=lZpE981EjWUqSAUkAnzmw13LGlTKBgHNSgXAtYL99zY&e=Thread Previous | Thread Next
- the new raku.org is really beautiful (and tought about spurt) by Marc Chantreux
- Re: the new raku.org is really beautiful (and tought about spurt) by Elizabeth Mattijsen
- Re: the new raku.org is really beautiful (and tought about spurt) by Marc Chantreux
- Re: the new raku.org is really beautiful (and tought about spurt) by Brian Duggan
- Re: the new raku.org is really beautiful (and tought about spurt) by Marc Chantreux
- Re: the new raku.org is really beautiful (and tought about spurt) by Elizabeth Mattijsen
- Re: the new raku.org is really beautiful (and tought about spurt) by William Michels via perl6-users
- Re: the new raku.org is really beautiful (and tought about spurt) by Elizabeth Mattijsen
- Re: the new raku.org is really beautiful (and tought about spurt) by Marc Chantreux
- Re: the new raku.org is really beautiful (and tought about spurt) by Elizabeth Mattijsen
- Re: the new raku.org is really beautiful (and tought about spurt) by Marc Chantreux
- Re: the new raku.org is really beautiful (and tought about spurt) by Elizabeth Mattijsen
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About