http://qs321.pair.com?node_id=241023

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hey guys
I'm having a problem with the following regex
$line =~ s/.{2}\s+/:/;
All I want to do is swap any number of spaces (the first 2) with ":"
i.e.
$line = 'this has three spaces'; #before $line = 'this:has:three spaces'; #after
Any idea what I'm doing wrong?