Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test .trans and sprintf.
  • Loading branch information
colomon committed Nov 9, 2010
1 parent 5ef402e commit 0b7573c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions trans-sprintf.pl
@@ -0,0 +1,10 @@
use v6;

my $pretty = ">> " ~ (". " x 20) ~ " <<" ;

for ^10
{
my $format = $pretty.trans( ['>>', '<<', '.']
=> ['%2d','%-2d','%s'] );
say sprintf $format, 1..22;
}

0 comments on commit 0b7573c

Please sign in to comment.