Majian wrote:
Dear list:
Hello,
I have a question on learning Perl . Please give me a help .
The problem is :
How can I split a string into chunks of size n bytes?Like this :
#!/usr/bin/perl
my $string = "1234567890abcdefghijABCDEFGHIJK";
my $n = 2;# $n is group size.
my @groups =
At 9:35 AM +0800 10/21/09, Majian wrote:
Dear list:
I have a question on learning Perl . Please give me a help .
The problem is :
How can I split a string into chunks of size n bytes?Like this :
#!/usr/bin/perl
my $string = "1234567890abcdefghijABCDEFGHIJK";
my $n = 2;# $n is group siz
Dear list:
I have a question on learning Perl . Please give me a help .
The problem is :
How can I split a string into chunks of size n bytes?Like this :
#!/usr/bin/perl
my $string = "1234567890abcdefghijABCDEFGHIJK";
my $n = 2;# $n is group size.
my @groups = unpack "a$n" x (length( $st