This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
01:08 habere-et-disper left 03:04 rf left 03:10 Heptite left
Nahita hi how do i emulate perl's -0777? $*IN.slurp()? 06:38
my trials:
$ echo -n $'one\ntwo' | raku -ne'say "<$*IN.slurp()>"' <two>
$ echo -n $'one\ntwo' | perl -0777 -ne'CORE::say "<$_>"' <one two> 06:39
why the raku one skips "one"?
06:48 tea3po joined 06:49 tea3po left, tea3po joined, tea3po left 06:50 tea3po joined
tea3po sorry I dc'd 06:50
anyway, in the first iteration you discard the read value, then read and print the rest of stdin (I think)(
06:52 teatwo left
Nahita thanks what can i do for preventing that 06:55
manually add $_ from left? i guess there is a better way 06:56
07:01 tea3po left, tea3po joined
tea3po $ echo -n $'one\ntwo' | raku -ne'say "<$*IN.slurp()>"' 07:03
sorry I dc'd again, and that was a mispaste
$ echo -n $'one\ntwo' | raku -ne'say "<$_>"' # I think this will work
Nahita that goes line by line though 07:09
aim is to treat what's coming as a single string 07:10
like -0777 of perl
tea3po then, $ echo -n $'one\ntwo' | raku -e'say "<$*IN.slurp()>"' #? 07:11
Nahita thank you very much 07:12
07:27 tea3po left 07:28 tea3po joined 08:03 tea3po left, tea3po joined 08:05 tea3po left, tea3po joined 08:06 tea3po left 08:07 tea3po joined 08:56 dakkar joined 09:04 raiph joined 09:05 raiph left 09:24 ab5tract joined 09:59 gfldex left 10:00 gfldex joined 10:10 seekr left 13:10 jgaz joined 13:26 Heptite joined 15:45 rf joined 16:12 discord-raku-bot left, discord-raku-bot joined 16:28 Heptite left 17:30 dakkar left 17:51 deadmarshal_ left 18:22 ab5tract left 18:48 tea3po left, tea3po joined 18:50 teatwo joined 18:51 teatwo left, teatwo joined 18:53 tea3po left 19:00 teatwo left, teatwo joined 19:32 Heptite joined 20:27 raiph joined 21:05 jgaz left 21:14 raiph left