in reply to OT: ASA formula

I guess you're after
use POSIX qw/tan/; $height = $width * tan $angle;

given an $angle in radians between 0 and pi/2 (excluding the boundaries).