perl ternary operator declatation code example Example: ternary operator perl $hours > 40 ? get_overtime_wage($hours) : get_normal_wage($hours);