![]() |
|< 1 ... 4 5 6 7 8 9 10 >| | ![]() |
93 Einträge, 10 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!perl
#
use warnings;
use strict;
my @Sachen;
open(FH1,"<","bla1.txt",FH2,"<","bla2.txt",FH3,"<","bla3.txt",FH4,"<","bla4.txt");
open(OUTDATEN, ">>" , "blagesamt.txt" ) or die "Fehler beim oeffnen/anlegen: $!";
@Sachen = <FH1>,<FH2>,<FH3>,<FH4>;
foreach (@Sachen)
{
print OUTDATEN (@Sachen);
print OUTDATEN "\n";
}
close (OUTDATEN) or die "kann nicht schließen blagesamt $!";
close () or die "kann nicht schließen bla1 $!";
Quote\n\nBareword "FH2" not allowed while "strict subs" in use at sab3.pl line 8.
Bareword "FH3" not allowed while "strict subs" in use at sab3.pl line 8.
Bareword "FH4" not allowed while "strict subs" in use at sab3.pl line 8.
Execution of sab3.pl aborted due to compilation errors.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use strict;
use warnings;
my @files = qw(bla1.txt bla2.txt bla3.txt bla4.txt);
my $output = 'blagesamt.txt';
for my $file(@files){
open(my $fh,'<',$file) or die $!;
open(my $write_fh,'>>',$output) or die $!;
while(my $line = <$fh>){
print $write_fh $line;
}
close $write_fh or die $!;
close $fh;
}
![]() |
|< 1 ... 4 5 6 7 8 9 10 >| | ![]() |
93 Einträge, 10 Seiten |