![]() |
|< 1 2 >| | ![]() |
19 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
my $lineCounter = 0;
my $line = "";
open(FILE, '<', $filename) || die "Error: Could not open!!!";
while( $line = <FILE> )
{
if ( ($line =~ /# Ausdruck1/) ||
($line =~ /# Ausdruck 2/) ||
($line =~ /# Ausdruck 3/) )
{
$contentLNKArray[$lineCounter++] = $line;
}
}
1
2
3
4
5
6
7
8
my %hash;
my @regexs = (Ausdruck1, Ausdruck2, Ausdruck3);
open my $fh,'<',$filename or die $!;
while(my $line = <$fh>){
my ($regex) = grep{$line =~ /$_/}@regexs;
$hash{$regex} = $line unless exists $hash{$regex};
}
close $fh;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
my $lineCounter = 0;
my $line = "";
open(FILE, '<', $filename) || die "Error: Could not open: $!";
while( $line = <FILE> ) {
if ( $line =~ /# Ausdruck1/
or
$line =~ /# Ausdruck 2/
or
$line =~ /# Ausdruck 3/
) {
$contentLNKArray[$lineCounter++] = $line;
last;
}
}
![]() |
|< 1 2 >| | ![]() |
19 Einträge, 2 Seiten |