my $hash = {}; my $i = "one"; #Below line giving no warning. But I DO NOT want this #my $val = ($i eq 'one') ? $hash->{'name'} = "hello"."world" : 'nothing'; # Below line giving warning. But I want this ($i eq 'one') ? $hash->{'name'} = "hello"."world" : 'nothing';