in reply to I use return on a subroutine
Since perl allways returns the value of the last expression, I usually just states $something if the sub's supposed to return some object.
For subs that prints stuff, I leave it to print() to decide.
If an error occurs, I use return 0 after setting an error value if possible.
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: I use return on a subroutine
by BBQ (Curate) on May 27, 2000 at 06:43 UTC | |
by elwarren (Priest) on May 28, 2000 at 19:18 UTC |