develooper Front page | perl.perl6.users | Postings from September 2022

sprintf and print question

Thread Next
From:
ToddAndMargo via perl6-users
Date:
September 2, 2022 02:37
Subject:
sprintf and print question
Message ID:
c045d9af-a76e-19f3-5899-cb9c409154de@zoho.com
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

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About