That's too much typing! Instead,local($object1->{field}) = $val; local($object2->{field}) = $val; local($object3->{field}) = $val;
So much nicer to look at, but completely, utterly wrong.for ($object1,$object2,$object3) { local($_->{field}) = $val; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Anti-snippet (or, "local" considered dangerous to fools")
by jeffa (Bishop) on Aug 06, 2003 at 17:23 UTC | |
by Juerd (Abbot) on Aug 06, 2003 at 17:29 UTC | |
by Mur (Pilgrim) on Aug 08, 2003 at 16:05 UTC |