My first instinct would be to look through CPAN and find a module that parses how you want. Do you have control over the un-parsed form of the data? Then someone else has almost certainly gone through all the thought processes you need to do.

For the particular case you are dealing with, and if you are sure that the form of the input data will always be "space, non-space characters, colon, digits" then you could use a regex thus:

use Data::Dumper; # to let us print out the results at the end
my $var = "xxx:12345 yyy:54321 zzz:13245";
my %hash = $var =~ /(\S+):(\d+)/g;
# a pattern match in array context returns a list of the matches
# and hash is a list in which odd-numbered items are keys and even-
# numbered items are values
print Dumper(\%hash);

Went to join the gridlock to see it
Held an eclipse party
Watched a live feed
I cn"t see tge kwubosd to amswr thus
I tried to see it, but 8000 miles of rock got in the way
What eclipse?
Wanted to see it, but they wouldn't reschedule it
Read the book instead