package xmlutil; use XML::Simple; #use strict; # I need symbolic dereferencing. my $xmlFile = "./galaxy.xml"; my $config = XMLin($xmlFile); sub get_ival { $parm_str = $_[0]; # reference the parameter directly. Prints Jane's number print "ref1 = ", $config->{jane}->{tel_no}, "\n"; # attempt to use symbolic dereference. Yields nothing! print "ref2 = ", $$parm_str, "\n"; # construct the same symbolic reference locally # just to make sure. Still yields nothing! $parm_str = "\$" . "config->{jane}->{tel_no}, "\n"; print "ref3 = ", $$parm_str, "\n"; } #### void get_ival( int *int_p, char *parm_str_p ) { char cmd_str[255]; STRLEN na; SV *val; dSP; ENTER; SAVETMPS; PUSHMARK(SP); XPUSHs( sv_2mortal( newSVpv( parm_str_p, 0 ) ) ); PUTBACK; call_pv( "xmlutil::get_ival", G_DISCARD ); FREETMPS; LEAVE; }