Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Using a varabile contained within another variable?

by ducky (Scribe)
on Sep 21, 2001 at 10:09 UTC ( [id://113813]=note: print w/replies, xml ) Need Help??


in reply to Using a varabile contained within another variable?

Well, while I would recommend using different approaches to something like this, soft references seems like what you're heading for:

my $x = 1 ; my $y = 'x' ; $$y++ ; # $x now == 2

You can't use this while using strict... most would consider that a feature =) Like I said, I'd try to find another way to approach whatever problem you're coding for. Since I don't know anything about it (perhaps this is just a learning exercise), I can't begin to offer more help in that regard.

If you do have a particular problem you're coding for, feel free to ask about alternative methods. TMTOWTDI, after all.

HTH

-Ducky

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-19 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found