|< 1 2 >| | 11 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
1:#!/usr/local/bin/perl5.8.0 -w
2:#
3:use FileHandle;
4:
5:my $content="Hallo dies ist ein Test";
6:local $fd;
7:$fd = new FileHandle("test.txt");
8:print $fd "\n------------------------\n$content";
9:$fd->close();
Can't use an undefined value as a symbol reference at test_filehand.pl line 8
print $fd, "\n------------------------\n$content";
print $fd "\n------------------------\n$content";
1
2
3
4
Use of uninitialized value in print at test_filehand.pl line 8.
--------------------
Can't call method "close" on an undefined value at test_filehand.pl line 9.
1
2
3
4
5
6
7
8
9
10
#!/usr/local/bin/perl5.8.0 -w
#
use FileHandle;
use strict;
my $content="Hallo dies ist ein Test";
my $fd;
$fd = new FileHandle("test.txt");
print $fd, "\n------------------------\n$content";
$fd->close();
1
2
3
4
5
Use of uninitialized value in print at test_filehand.pl line 8.
--------------------
Can't call method "close" on an undefined value at test_filehand.pl line 9.
Hallo dies ist ein Test
1
2
3
4
5
6
7
8
9
10
#!/usr/local/bin/perl5.8.0 -w
#
use FileHandle;
use strict;
my $content="Hallo dies ist ein Test";
my $fd;
$fd = new FileHandle("test.txt");
print $fd, "\n------------------------\n$content";
$fd->close();
1
2
3
4
5
Use of uninitialized value in print at test_filehand.pl line 8.
--------------------
Can't call method "close" on an undefined value at test_filehand.pl line 9.
Hallo dies ist ein Test
1
2
3
4
5
6
7
8
9
10
11
#!/usr/local/bin/perl5.8.0 -w
#
use FileHandle;
use strict;
my $content="Hallo dies ist ein Test";
[B]my $fd = new FileHandle("test.txt");[/B]
print $fd "\n------------------------\n$content";
$fd->close();
my $fd = new FileHandle(">test.txt");
1
2
3
4
5
6
7
8
9
use FileHandle;
my $fh = FileHandle->new("> $file");
unless ($fh) {
die "Error: couldn't create '$file': $!\n";
}
else {
print $fh "irgendwas\n";
$fh->close();
} # else
|< 1 2 >| | 11 Einträge, 2 Seiten |