in reply to Passing hash reference to a subroutine
perldata says your typeglob method "used to be the preferred way to pass arrays and hashes by reference into a function, but now that we have real references, this is seldom needed." And, "Much safer is to use a reference."
And your typeglob method doesn't play nicely with strict and warnings, while the reference method does.
And for opinion, I think the reference method is absolutely clear; while the * introduces a bit of mystery.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing hash reference to a subroutine
by tlk00 (Initiate) on Feb 20, 2009 at 14:54 UTC | |
by hbm (Hermit) on Feb 20, 2009 at 15:48 UTC |