my $s = ' ABC: 123 xyz: 100 def: YYY aaa: ZZZ';; my %hash = $s =~ m[(\S+)\s*:\s*(\S+)]g;; print %hash;; ABC 123 def YYY aaa ZZZ xyz 100
In reply to Re: extracting the key value pairs from a string
by BrowserUk
in thread extracting the key value pairs from a string
by mnranjeeth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |