in reply to su to root in a perlscript

You won't be able to change your UID (see also POSIX) unless your script has root privileges to begin with (unless you do weird stuff like promping for the root password etc. etc.). Modifying $< and $> is only useful if you are root and need to be another user to perform certain functions.

Why not use sudo (or su, if you can't use sudo) to call the script?

    sudo myscript.pl

This is the standard way to perform root functions. For example, if you install new perl modules, you will naturally do

perl Makefile.PL make make test sudo make install

instead of relying on make to make itself root to install the files. This way, you give control to the user -- the way it should be.