is also called "fat comma". It isn't a hash binder, even if it's used like that: it's just a comma that stringifies its left operand if it's a bareword. If-condition forces scalar context, and comma in scalar context returns its second operand: in this case, it's $num. So, you basically print if $num is true, and you assign to $num if $payperiod matches $start_day.