|
Even better are ones without those unsightly curly brackets:
<statement> if <expression>;
Such as this useful one:
print "foo = $foo\n" if $DEBUG;
So then you can just define $DEBUG as 1 and easily use it to print out debug-only messages. Although, it's all quite surprising it doesn't work like in C:
if (<expression>) <statement>;
I find the C way the easiest, because if you need to add more statements later, simply add curly brackets. But noooo, Larry Wall has to go and make things backwards! Oh well, it's still readable...
|