I kind of asked this question at the beginning of the week or so, but received no answers, so I'm asking a different way in the hopes that someone will answer. Sometimes the question is wrong...
So, back in 2000 someone asked how to make
variably named packages.
My question is:
When you got back into main:: how would you call $Foo::a?
If you called it with:
print $Foo::a;
That would work... BUT, its likely you wouldn't know the name of the package since it was variable. So you might try:
my $package = $input{somepackage}; # Foo was passed to input
print $$package::a;
but that wouldn't work. So you might try:
$pleasework = eval{$$package::a};
print $pleasework;
but that wouldn't work either, so you might go insane for a week and then ask the monks again! ;)
thanks,
alex
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.