Leser: 6
![]() |
|< 1 2 3 >| | ![]() |
25 Einträge, 3 Seiten |
1
2
3
while(defined (my $line = <$fh>)){
if($line =~ /START/ .. $line =~ /ENDE/){
push(@lines,$line);
while ( <$fh> ) { push @lines, $_ if /START/ .. /END/ }
my @lines = grep { /START/ .. /END/ } <$fh>;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
my @lines;
open my $fh,'<',$file or die $!;
while(<$fh>){
if(/START/ .. /ENDE/){
foo();
push(@lines,$_);
}
}
close $fh;
print $_ for @lines;
sub foo {
open my $fh, '<',$otherfile or die $!;
while (<$fh>) {
# operations
}
close $fh;
}
while(defined (my $line = <$fh>)){
while(defined (my $line = <$fh>)){
1
2
3
4
5
6
7
8
9
10
perl -MO=Deparse -wle'
while (my $line = <>) {
print $line
}'
BEGIN { $^W = 1; }
BEGIN { $/ = "\n"; $\ = "\n"; }
while (defined(my $line = <ARGV>)) {
print $line;
}
-e syntax OK
while ( <DATA> ) { /START/ .. /END/ or push @lines, $_ }
![]() |
|< 1 2 3 >| | ![]() |
25 Einträge, 3 Seiten |