... $str .= $1 . $/ while ( $ARGV[0] =~ m/(.{LEN})/g ); ## NOTE 3 is now LEN ...