Hello List, Can this subroutine be better written? I am getting the following erros:
Use of uninitialized value $y in subtraction (-) at form.pl line 52. Use of uninitialized value $y in addition (+) at form.pl line 52. sub avg_az { my($x, $y) = shift(@_); return abs($x-$y)<180 ? ($x+$y)/2 : (360+$x+$y)/2<360 ? (360+$x+$y)/2 : (360+$x+$y)/2-360 } print avg_az(90,30),"\n"; Thank you, Chris