On 9/1/22 23:50, ToddAndMargo via perl6-users wrote:
On 9/1/22 19:37, ToddAndMargo via perl6-users wrote:Hi All,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. -T$ raku -e 'printf "%.4s\n", "andefghi";' ande
$ raku -e 'print "andefghi".substr(0,4), "\n";' ande$ perl6 -I/home/linuxutil/p6lib -e 'use PrintColors :PrintGreen; PrintGreen "abcdefghi".substr(0,4), "\n";'
abcd