Yes indeed. Perl does this with special variables instead of with function calls. The real uid is $<, and the effective uid is $>.
Here's the Perl equivalent of your C statement:
$> = $<; # set effective uid to real uid
See the docs for more examples, as well as the variables for gid.