in reply to Re: Unexpected matching results (dynamic scope "$1")
in thread Unexpected matching results

Thanks a lot! If I change my code to

'cause' => (/CAUSE (\S+)/ ?"$1":'UNDEF'), 'effect' => (/AFFECT (\S+)/?"$1":'UNDEF'),

it works as expected.