Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Win32::TieRegistry and Delimiterby mumbles (Friar) |
on Apr 15, 2002 at 13:24 UTC ( [id://159173]=perlquestion: print w/replies, xml ) | Need Help?? |
mumbles has asked for the wisdom of the Perl Monks concerning the following question:
The Setting: ActiveState 5.6.1 running on WinNT 4 I have read the documentation for Win32::TieRegistry Win32::TieRegistry Which I am sure is complete but which I fear I am far too obtuse to understand and so now find I am more confused than ever. The Problem: use Win32::TieRegistry( Delimiter=>"/" ); $remoteKey = $Registry->{"//$pserver/LMachine/SYSTEM/CurrentControlSet/Control/Print/Monitors/HP Standard TCP/IP Port/Ports/$portname/"} || die "Can't read the port key on $pserver: $^E\n";; Note that the key I want to reference is "HP Standard TCP/IP Port". Since the delimiter is set to "/" I assume Perl is reading this as two seperate keys and returns the die statement "Can't read the port key" I have tried "//", "\", '//", '\", etc with no luck. Could someone please point out how to get around this. I am sure I will kick myself when the obvious is revealed. Thanks in advance.
Back to
Seekers of Perl Wisdom
|
|