in reply to Re^2: Print Vs Return In a Subroutine
in thread Print Vs Return In a Subroutine
No offense here but in that example I don`t see the point in return/print issue the author of the node asked. I am new to Perl, but as far as I got it the return statement of ax() function you defined is returning 1 because of the successful printing, while bx() just returns a variable content. If print is a function then calling it from another function is the same as calling sprintf... which one of them is better, that I don`t know. Since it`s more than 1 way to do it, I think the owner of this node must choose for him/herself.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Print Vs Return In a Subroutine
by wwe (Friar) on Mar 31, 2012 at 21:49 UTC |