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