in reply to If question
I dont like this indent style much because of this type of problem.(I'm a cuddeled else man myself, I don't like 'em lonely :-) Change it to:if ($condition) { #code }; # <-------- semicolon is syntax error elsif ($condition) { #code }
Of course as suaveant said you'll also have to change your regex syntax.if ($condition) { #code } elsif ($condition) { #code }
HTHforeach (@vals) { $SubKey->GetValues(\%cvalues); if ($cvalues{'Server'}[2] =~/NT-PRINT1/) { print "something\n"; } elsif ($cvalues{'Server'}[2] =~/NT-PRINT2/) { print "another thing\n"; } }
Yves
--
You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)
|
|---|