Leser: 2
![]() |
|< 1 2 3 >| | ![]() |
21 Einträge, 3 Seiten |
1
2
3
4
use strict;
use warnings;
my $c = 0; sub foo { print "$c\n"; $c++; my $mem = 'x' x 1000000; foo(); }
foo();
1
2
3
4
use strict;
use warnings;
my $c = 0; sub foo { print "$c\n"; $c++; my $mem = 'x' x 1000000; foo(); }
foo();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#! perl
use Win32::TieRegistry;
print "Registryschluessel finden und loeschen!\n";
print "Suchbegriff: ";
$eingabe = <STDIN>;
my $regroot = $Registry -> Open ("CConfig/Software", {Delimiter=>"/"});
my $regpath= $regroot -> Path;
&func($regroot);
sub func
{ my $regkey = shift;
my ($key, $dir);
foreach $key (keys %$regkey) &nb
sp; # Check ob Keys oder Keys mit Werten
{ chomp($key);
if ($key =~ /^(\/[$eingabe].*)/i)
{ my $name = $1;
$PathSubKey = $regkey -> Path;
chomp($name);
print "RegistyPath: ", $PathSubKey, "\n";
print "Name: ", $name, " Wert: ", $regkey->{$name}, "\n\n";
print "Schluesselwertepaar loeschen? [j/n] ";
my $choice = <STDIN>;
print $choice;
if ($choice =~ /j{1}|J{1}/)
{ print "JA";
my $del = delete $regkey -> {"$name"};
}
}
if ($key =~ /(\/)$/)
{if ($key =~ /^([$eingabe].*)/i)
{ my $name1 = $1;
$PathSubKey = $regkey -> Path;
print $PathSubKey, "[$name1]", "\n";
print "Schluessel mit allen Schluesselwertepaaren loeschen? [j/n] ";
my $choice1 = <STDIN>;
if ($choice1 =~ /j{1}|J{1}/)
{ my $del1 = delete $regkey -> {"$name1"};
exit;
}
}
$dir = $regkey -> Open ("$key"); # In neuen Schlüssel wechseln
$path = $dir -> Path;
&func($dir);
} ;
}
}
if ($key =~ /^(\/[$eingabe].*)/i)
if ($key =~ /^(\/\Q$eingabe\E)/i)
if ($choice1 =~ /j{1}|J{1}/)
if ($choice1 =~ /j/i)
1
2
3
4
5
6
7
8
my $eingabe = "perl";
foreach (qw/perl-community persil perle pass/)
{
if ($_ =~ /^\Q$eingabe\E/) {
print "Ergebnis: $_\n";
}
}
![]() |
|< 1 2 3 >| | ![]() |
21 Einträge, 3 Seiten |