mephtu has asked for the wisdom of the Perl Monks concerning the following question:
To the beseeched,
I wish to return a glob from a sub and use that glob as a form of a call in an expression. I am wrestling with the syntax. Here is what I am expecting success to look like:
sub retg { ... return *var }
then,
${retg} = ... (possibly) $retg = ... (maybe) or even $foo = $retg (I don't know)
In other words, I wish to call retg within the expression and then do the appropriate "cast" to and use that variable.
Much thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Returning and using a glob from a sub.
by BrowserUk (Patriarch) on Dec 13, 2014 at 01:22 UTC | |
|
Re: Returning and using a glob from a sub.
by BrowserUk (Patriarch) on Dec 12, 2014 at 23:41 UTC | |
|
Re: Returning and using a glob from a sub.
by runrig (Abbot) on Dec 12, 2014 at 23:45 UTC | |
|
Re: Returning and using a glob from a sub.
by LanX (Saint) on Dec 12, 2014 at 23:51 UTC | |
|
Re: Returning and using a glob from a sub.
by LanX (Saint) on Dec 13, 2014 at 00:17 UTC | |
|
Re: Returning and using a glob from a sub. (lvalue sub)
by LanX (Saint) on Dec 13, 2014 at 15:31 UTC | |
|
Re: Returning and using a glob from a sub.
by mephtu (Novice) on Dec 26, 2014 at 22:20 UTC | |
by BrowserUk (Patriarch) on Dec 26, 2014 at 23:04 UTC | |
by LanX (Saint) on Dec 27, 2014 at 00:23 UTC | |
by LanX (Saint) on Dec 27, 2014 at 00:38 UTC |