if ($scan = PERSONID) { # ... if ($transaction->{'STATE'} = PERSONID) # ... if ($transaction -> {'STATE'} = UPDATE) {