- can scalars be passed by reference?
yes. any data type can be passed by reference, be it scalar, array, hash, glob, etc. though, usually scalars aren't passed as a reference, because they're so easy to pass around as they are.
- would the resulting regular expression in the library untaint them?
if you mean the 'corresponding' regular expression, then yes. but you must first dereference the reference. for more on that, take a look at perlref.
for more tainting info, there's a good tutorial that includes tainting at Ovid's Web Programming with Perl course
~Particle *accelerates*