I have a string that I need to split into three-character chunks. Googling found the following code, which works fine:
$input = "DEADBEEF";
@output = ();
my @output = ( $input =~ m/.{3}/g );
print $_."\n" foreach (@output);
I am a Perl beginner; can someone explain to me what the expression $input =~ m/.{3}/g
does?