Bug: my $ret in there after ret already being used. (scope problem)