in reply to Interpolating inside Net::DNS

rr_add is a subroutine, and your $var1 contains its name.

You are on your way to symbolic references. Which is probably a bad thing for someone who does not know the correct syntax for symbolic references ...

To answer your question: If you want to use your symbolic reference to a subroutine as a function, you need to dereference it as a function.

# Either deref with ->(): $var1->('foo.example.com. 86400 A 192.168.1.2') # ... or, less fancy, deref with sigil: &{$var1}('foo.example.com. 86400 A 192.168.1.2')

... and so I have probably given you enough rope to hang yourself ... :-\

Actually, this is one of those places where I just might use symbolic references. If you can forever trust $var1, that is. If that is not the case, you might do better to use a lookup table with real references.

print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!