A good mailing list to check out for Win32 Perl questions is the
perl-ntadmins list at topica.com.  

-----Original Message-----
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 8:13 AM
To: Jorge Goncalvez
Cc: [EMAIL PROTECTED]
Subject: Re:What's wrong with this?


On Jan 24, Jorge Goncalvez said:

>#!/usr/local/bin/perl -w
>use Win32::Registry;
>my $Register ="Software";
>#my $Register2=".DEFAULT\\Software";
>my $hkey;
>my @array= qw($HKEY_LOCAL_MACHINE $HKEY_CURRENT_USER ) ;

Don't use qw() here.  You need

  my @array = ($HKEY_LOCAL_MACHINE, $HKEY_CURRENT_USER);

Using qw() makes a list of single-quoted strings, so your array would look
like

  my @array = ('$HKEY_LOCAL_MACHINE', '$HKEY_CURRENT_USER');

>foreach (@array)
>{
>       $_=>Open($Register,$hkey)|| die $!;

The => here should be a ->, that's the major typo.

>       $hkey->DeleteKey("Cygwin2");
>       $hkey->Close();
>}

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------------------
This email may contain confidential and privileged 
material for the sole use of the intended recipient. 
If you are not the intended recipient, please contact 
the sender and delete all copies.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to