in reply to Re^5: 'return:' instead of 'return'
in thread 'return:' instead of 'return'
Yes, there is no difference and why should there be any?I don't know, maybe you could use it to force other Best Practices, eg:
Where return would only evaluate to true if the calling program read the value of the call.sub close_all { my $self = shift; $success = 1; foreach( $self->files ) { $success = $_->close && $success } return $success or die("You must check the return value of close_all +"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: 'return:' instead of 'return'
by jethro (Monsignor) on Jun 12, 2009 at 13:34 UTC |