Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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

Replies are listed 'Best First'.
Re^3: How do create a variable in another package in Perl?
by GrandFather (Sage) 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 moritz (Cardinal) on Dec 12, 2011 at 09:18 UTC
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 taking refuge in the Monastery: (9)
As of 2016-06-27 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (337 votes). Check out past polls.