Dunno about 'cleaner' (everyone has their own understanding of that term) but certainly more succinct:
my $memory_data = 'foo=bar;zub=baz;yar=grr'; + my %data; + $data{$1} = $2 while $memory_data =~ /([^=;]+)=([^;]+)/g;
/J\
In reply to Re: clean code
by gellyfish
in thread clean code
by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |