in reply to Perl Regular Expressions

Here is a different approach that splits on whitespace and the dash:
my ($key, $value) = split /\s*-\s+/, $line;
Update: Sorry, accidentally submitted too early. Anyway, to handle the continuation lines, we need a loop:
while (<>) { if (/^(\S+)\s*-\s+(.+)$/) { push @pair, [$key,$value] if $key; # save prev pair $key = $1; $value = $2; } elsif (/^\s+-\s+(.+)$/) { $value .= $1; } else { print "Badly formatted line: $_\n"; } }

-Mark