Thread Win32::OLE auf dem pc gesucht: kann zwar modul finden gibt aber mehrere (92 answers)
Opened by sabrina at 2006-08-30 11:40

Dubu
 2006-09-13 11:52
#69411 #69411
User since
2003-08-04
2145 Artikel
ModeratorIn + EditorIn

user image
[quote=renee,13.09.2006, 09:15]
Code: (dl )
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;
}
[/quote]
Warum die Ausgabedatei immer wieder öffnen?
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl
use strict;
use warnings;

my @files = qw(bla1.txt bla2.txt bla3.txt bla4.txt);
my $output = 'blagesamt.txt';

open(my $write_fh, '>>', $output) or die $!;
for my $file(@files){
   open(my $fh,'<',$file) or die $!;
   while(my $line = <$fh>){
       print $write_fh $line;
   }
   close $fh;
}
close $write_fh or die $!;

View full thread Win32::OLE auf dem pc gesucht: kann zwar modul finden gibt aber mehrere