This is ok:
if ($some_var==$some_value) {}
This is ok too:
print "hello" if ($some_var==$some_value);
But this raises an error:
if ($some_var==$some_value) print "some_message";
Why must ‘if’ clause in Perl come with either curly brackets or nothing?
Perl has a rather complex syntax and is rather difficult to parse. I gather that curly brackets were made mandatory following an if clause so as to remove an ambiguity and make Perl code easier to parse.