This is more of a system security issue rather than a perl issue per se.
The real and effective user account under which a perl script is executed can be modified by means of the real and effective user ID variables ($<, $>, $( and $)) listed in perlvar. Note that these variables can only be set, changing the corresponding process user ID variables, on machines supporting the associated set[re][ug]id() routine. This method of modifying real and effective user rights however may require the invocation of the script with heightened rights (suid).
An alternate approach, particularly well suited to an environment where suid scripts are not appropriate, is to make use of sudo - This command allows administrators to grant permissions to users to execute priviledged commands without having to su to root. The advantage with this command offers in this scenario however is that, when configured as such, it allows priviledged commands to be executed by users without prompting for a password.
perl -le 'print+unpack("N",pack("B32","00000000000000000000000111111101"))' |