Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Access an imported constant via a variable that holds the name of it

by nobull (Friar)
on Apr 08, 2005 at 16:46 UTC ( [id://446077]=note: print w/replies, xml ) Need Help??


in reply to Access an imported constant via a variable that holds the name of it

Clearly this can be done with symrefs...
my $bah = "INTEGER"; snmpset("1.3.6.1.4.1.9.9.68.1.2.2.1.2.22","1.1.1.1","mystring",&$bah,1 +);
...but symrefs are nasty things so why not...
my $bah = INTEGER; snmpset("1.3.6.1.4.1.9.9.68.1.2.2.1.2.22","1.1.1.1","mystring",$bah,1) +;
...or...
my $bah = \&INTEGER; snmpset("1.3.6.1.4.1.9.9.68.1.2.2.1.2.22","1.1.1.1","mystring",&$bah,1 +);
...?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-19 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found