in reply to Elegant way to return true or nothing from a subroutine?

The only way to return 'nothing' from a subroutine is to call it in void context. Otherwise, it will always return something. An argument less return in scalar context will return the undefined value. In list context, such a thing will return an empty list (which some may call 'nothing'). Buildins often return the empty string in scalar context, a false but defined value, that doesn't have a length when printed. But it certainly isn't 'nothing'.
  • Comment on Re: Elegant way to return true or nothing from a subroutine?