Skip to content

Instantly share code, notes, and snippets.

@colomon
Created October 19, 2010 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colomon/635055 to your computer and use it in GitHub Desktop.
Save colomon/635055 to your computer and use it in GitHub Desktop.
my $file = open "test.txt", :w;
for 1..1000 {
$file.say: sprintf("This is a test %7d", $_);
}
# end of text.txt after executing this:
This is a test 980
This is a test 981
This is a test 982
This is a test 983
This is a test 984
This is a test 985
This is a test 986
This is a test 987
This is a test 988
This is a test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment