use POSIX qw/tan/; $height = $width * tan $angle;