What, exactly, does this perl script do? It may need things that it can only get from being run inside a logged-in session, which an autostart wouldn't have...
Yes, that is the detail needed. Your user got an X credentials file or something similar by logging into the computer... Anything inside that logged-in session, including programs launched by their autostarter, will share those credentials and be allowed to use the X session.
Things run by rc.local on the other hand do not.
For that matter, rc.local would get run even if your machine had no X server, so there's no guarantee it'd wait for X to start first.
Running it from inside the user session as you have, is a much better solution IMHO. You could also try messing with the xinitrc config file.