sub foo { while () { chop; /^ \s* (\w+) \s* = \s* " (.*) " $/x or /^ \s* (\w+) \s* = \s* (.*) $/x or die "Malformed line $. in FOO"; } }