$x = $y ** (1/4) if $y > 0; #### if($y >= 0){ $x = $y ** (1/4); }else{ undef($x); die "Even roots of negative numbers require complex arithmetic\n"; }