sub match_var { my ($var, $struct, $env) = @_; if (exists($env->{$var})) { match($env->{$var}, $struct, $env); } else { $env->{$var} = $struct; } }