in reply to Re^2: unless weirdness
in thread unless weirdness

Doing it that way both if and unless will fail. If you don't declare the sub up front you need to call the sub with parens: check_disk_space(). There is some weirdness though. With if the error is
Bareword "check_disk_space" not allowed while "strict subs" in use...
and with unless
Bareword "check_disk_space" not allowed while "strict subs" in use... Bareword "check_disk_space" not allowed while "strict subs" in use...
Not sure why it comes up twice.

I prefer to have all my subs at the end of the script and always call them with the parens. I use parens with perl built ins too if the args have any level of complexity. YMMV.