Leser: 1
|< 1 2 >| | 16 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;
my $cli = 'file.txt';
open (FILE,"<$cli") or die $!;
while (my $cli_str = <FILE>)
{
my @cli_str = ("$cli_str");
&next(@cli_str);
}
close FILE;
sub next
{
my (@cli_str) = @_;
print @cli_str;
open (IN, ">data.txt") or die $!;
print IN @cli_str;
close IN;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;
my $cli = 'file.txt';
open (FILE,"<$cli") or die $!;
while (my $cli_str = <FILE>)
{
my @cli_str = ("$cli_str");
&next(@cli_str);
}
close FILE;
sub next
{
my (@cli_str) = @_;
print @cli_str;
open (IN, ">>data.txt") or die $!;
print IN @cli_str;
close IN;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use strict;
use warnings;
my $cli = 'file.txt';
open (FILE,"<$cli") or die $!;
while (my $cli_str = <FILE>) {
nextline($cli_str);
}
closefh();
close FILE;
{
my $fh;
sub nextline {
my (@cli_str) = @_;
print @cli_str;
unless ($fh && defined fileno $fh) {
open $fh, ">data.txt" or die $!;
}
print $fh @cli_str;
}
sub closefh {
close $fh;
undef $fh;
}
}
|< 1 2 >| | 16 Einträge, 2 Seiten |