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.
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"?
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)(
Nahita thanks what can i do for preventing that 06:55
manually add $_ from left? i guess there is a better way 06:56
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