On Fri, 2 Sept 2022 at 12:37, ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> Is there a cleaner way to do this?
>
>      $ raku -e 'print( (sprintf "%.4s", "andefghi" ) ~ "\n";)'
>      ande
>
> I want to print the first four letter s to STDOUT.
>

 $ raku -e 'printf "%.4s\n","andefghi"'
ande

-- 
Norman Gaywood, Computer Systems Officer
School of Science and Technology
University of New England
Armidale NSW 2351, Australia

ngayw...@une.edu.au  http://turing.une.edu.au/~ngaywood
Phone: +61 (0)2 6773 2412  Mobile: +61 (0)4 7862 0062

Please avoid sending me Word or Power Point attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Reply via email to