Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: How do create a variable in another package in Perl?

by PerlOnTheWay (Scribe)
on Dec 12, 2011 at 09:03 UTC ( #943043=note: print w/ replies, xml ) Need Help??


in reply to Re: How do create a variable in another package in Perl?
in thread How do create a variable in another package in Perl?

This is needed when the VariableName and the value of the variable(here (1,2,3)) are both determined on the fly


Comment on Re^2: How do create a variable in another package in Perl?
Select or Download Code
Re^3: How do create a variable in another package in Perl?
by moritz (Cardinal) on Dec 12, 2011 at 09:18 UTC
Re^3: How do create a variable in another package in Perl?
by GrandFather (Cardinal) on Dec 12, 2011 at 09:20 UTC

    In which case it isn't needed. Use a hash instead, or maybe some other construct entirely. Show us sample code where you think such a thing is needed and we'll show you a much better way to do it.

    True laziness is hard work
Re^3: How do create a variable in another package in Perl?
by Anonymous Monk on Dec 12, 2011 at 09:48 UTC

    Hello, I have small joke for you :D

    <GoodHumor>

    I agree with moritz :) there is a strong suggestion of an interface design problem, a strong suggestion for a need to just pass args

    Here is my complete analysis

    • +1 key phrase "in another package"
    • +1 newbee key phrase "in Perl"
    • +1 asking for the syntax
    • +1 while posessing the key keyword (package) to find the correct syntax
    • +1 key phrase "is needed"
    • +1 key phrase "on the fly"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943043]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2014-09-22 20:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (201 votes), past polls