in reply to Re: Re: Problem creating a function
in thread Problem creating a function
Modifying $_[0] is bad practice.That's fine advice for newbies, but it's a white lie. Many languages support OUT parameters. Including Perl. At worst, it merits an encouragement to document the technique if used.
what happens if you cleaner("This will crash your code with a can't modify read only value error")Perl helpfully tells you that you used the function incorrectly. So you got and fix your code. What's the big deal?
jdporter
...porque es dificil estar guapo y blanco.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Problem creating a function
by tachyon (Chancellor) on Dec 25, 2002 at 15:06 UTC | |
by IlyaM (Parson) on Dec 25, 2002 at 16:06 UTC | |
by tachyon (Chancellor) on Dec 26, 2002 at 02:20 UTC | |
by IlyaM (Parson) on Dec 26, 2002 at 10:48 UTC | |
by jdporter (Paladin) on Dec 27, 2002 at 05:05 UTC | |
by jdporter (Paladin) on Dec 27, 2002 at 04:55 UTC |