if ($_ =~/@searchstring/i)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
open(IN,'<'.$f) || die "Can not open file $datei: $!";
while(<IN>){
$n=$n+1;
printf "$n.)$_";
if (grep{$_} @searchstring)
{
print "\nfound in $f in $z\n\n"
}
else
{
}
}
close IN;
2012-08-01T07:58:48 Iggy86
QuoteCode: (dl )if (grep{$_} @searchstring)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
open(my $IN,'<'.$f) || die "Can not open file $datei: $!";
while(<$IN>){
$n=$n+1;
printf "$n.)$_";
$t = $_;
if (grep{/\Q$t/} @searchstring)
{
print "\nfound in $f in $z\n\n"
}
else
{
print "\nnot found @searchstring in $_\n"
}
}
close $IN;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
open(my $IN,'<'.$f) || die "Can not open file $datei: $!";
while(<$IN>){
$n=$n+1;
printf "$n.)$_";
foreach $t (@searchstring)
{
if ($_=~/$t/i)
{
print "\nfound in $f in $z\n\n"
}
else
{
#print "\nnot found $t in $_\n"
}
}
}
close $IN;