in reply to extracting the key value pairs from a string

As is often the case with Perl, you can cheat. :)

#!/usr/bin/perl -w use strict; my $a = " a: b c: d e: f "; $a =~ y/://d; my %h = eval "qw/$a/"; # The Evil String Eval print "Key [$_] | Value [$h{$_}]\n" for keys %h;

-- 
Human history becomes more and more a race between education and catastrophe. -- HG Wells