in reply to Detecting Environment

You might also want to peruse perlport.

--Pileofrogs