[EMAIL PROTECTED] wrote:

I've been following this debate all week and noticed one thing missing... No-one has mentioned that it's bad programming practice to rely on a sub to modify an argument. If you want to modify a value, it should be explicitly returned, viz.:

sub add_one {
my $in_var = shift;

   return( ++$in_var );

}

There are languages and cultures in which that applies, and others in which it does not. Perl is not clearly on the one side or the other.

--
John W. Kennedy
"But now is a new thing which is very old--
that the rich make themselves richer and not poorer,
which is the true Gospel, for the poor's sake."
  -- Charles Williams.  "Judgement at Chelmsford"


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to