Yes you're right a SUID script/prog is executed with the execution right of
the owner of the file (not the one who execute the file...
a SUID root script (a script own by root and with the SUID bit set) will execute with root rights...
BTW: I say script but it could be a shell-script,a perl script or an executable
(c compiled prog)...
Note also that some OS disable SUID script execution for several security reasons (race condition,IFS modification and incorrect input handling (among other things) lead to several security risks...)
To know more on this with perl :
perldoc perlsec (look especially for suidperl)
To know more on SUID scripts/prog security :
Any security related site...
(<self-promotion>
checksum.org by example </self-promotion>)