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]