$inp =~ s/\d{4}\K\B/ /g; # hehehe [download]
In reply to Re: Passing digits in perl by Anonymous Monk in thread Passing digits in perl by peacefuldragon