Skip to content

Instantly share code, notes, and snippets.

@perforb
Created February 27, 2012 15:49
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 perforb/1924852 to your computer and use it in GitHub Desktop.
Save perforb/1924852 to your computer and use it in GitHub Desktop.
It sprits a character string in N characters.
#!/usr/bin/env perl
use 5.12.0;
use warnings;
# It sprits a character string in N characters.
my @alphabets = join('', 'a' .. 'y') =~ m/.{1,3}/g;
say join ',', @alphabets;
# >> abc,def,ghi,jkl,mno,pqr,stu,vwx,y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment