in reply to returning a tied variable
I think you've got no choice but to return a reference to the tied scalar. E.g.
tie $mod,'ModName',{blabla} ; return \$mod ;
If you're looking for an alternative, one would be to tie a scalar which is passed to the sub (by ref) rather than tying a lexical which is created in the sub. But I'm not suggesting that that's a better way to go.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: returning a tied variable
by japhy (Canon) on Mar 01, 2006 at 16:06 UTC | |
|
Re^2: returning a tied variable
by jeanluca (Deacon) on Mar 01, 2006 at 16:00 UTC | |
by jdporter (Paladin) on Mar 01, 2006 at 16:13 UTC |