in reply to Troubles with simple parsing

Maybe it is a requirement that item must be a key with its value a chip name, (Athlon 4000+). Instead, the chip name could be a key to an anon hash of the three other attributes, producing results with min. code.
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %chips; { local $/ = ""; while(<DATA>) { chomp; # Capture chip name in $1 and delete line with chip name s/^\[([^\]]+)\]\n// or die "error: ..."; $chips{$1} = {split /[\n=]/}; } } print Dumper \%chips; __DATA__ [Athlon 4000+] price=300 euro produce=AMD description=Fast [Celeron 3000] price=200 euro produce=Intel description=Slower