yoda54 has asked for the wisdom of the Perl Monks concerning the following question:
I'd like to load a contents of a file to a variable then "use it" as a module during runtime. Is that possible?
Thanks for any help!
open(F, $_); my $f = do { local $/; <F> }; close(F); "use or load" $f as a module, perhaps eval somehow?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use variable as a module during runtime.
by Athanasius (Archbishop) on Oct 21, 2012 at 02:35 UTC | |
by yoda54 (Monk) on Oct 21, 2012 at 03:11 UTC | |
by Athanasius (Archbishop) on Oct 21, 2012 at 03:40 UTC | |
by ysth (Canon) on Oct 22, 2012 at 01:40 UTC | |
by yoda54 (Monk) on Oct 22, 2012 at 23:41 UTC | |
|
Re: Use variable as a module during runtime.
by tobyink (Canon) on Oct 21, 2012 at 08:16 UTC | |
by yoda54 (Monk) on Oct 22, 2012 at 23:42 UTC | |
|
Re: Use variable as a module during runtime.
by NetWallah (Canon) on Oct 21, 2012 at 02:36 UTC | |
|
Re: Use variable as a module during runtime.
by locked_user sundialsvc4 (Abbot) on Oct 22, 2012 at 13:53 UTC |