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.
In reply to Re^3: Print Vs Return In a Subroutine
by heatblazer
in thread Print Vs Return In a Subroutine
by remya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |