in reply to Simple IF, IF, IF or ELSE
or (kind of ugly)$drink = 'unknown'; $drink = 'non alky' if $punter eq 'coffee'; $drink = 'alky' if $punter eq 'beer'; $drink = 'proper alky' if $punter eq 'whisky'
$drink = $punter eq 'coffee'?'non alky':$punter eq 'beer'?'alky':$punt +er eq 'whisky'?'proper alky':'unknown';
|
|---|