in reply to ..."while" i do perl...
I would categorise that as bad programming style. It will fail under "use Strict". I would prefer to show that "blah" was really a subroutine in the following way:sub blah { # Do some thinking here and give a value to $return_code return $return_code; } while (blah) { # do something really useful here }
or even use &blah() to show this is really a subroutine call.while (&blah) { }
A question to the true perl gurus - is there any advantage in putting in the () if there are no arguments being passed to a sub?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: ..."while" i do perl...
by tilly (Archbishop) on Jan 29, 2001 at 07:54 UTC | |
|
Re: Re: ..."while" i do perl...
by chromatic (Archbishop) on Jan 29, 2001 at 08:00 UTC |