Hi Struppi!
#!/usr/bin/perl -w
use strict;
my $filename = "test.txt";
open FILE, ">$filename" or die "Fehler beim öffnen: $!";print FILE "1st line\n";
constructor1 (*FILE);close FILE;
sub constructor1
{
my $FH = shift || return;
print $FH "2nd line\n";
}
Ich kenne mich mit Perl nicht aus, aber woher weiß denn die Funktion constructor1, dass $FH der Filehandler von FILE ist?
MfG H☼psel
--
"It's amazing I won. I was running against peace, prosperity, and incumbency."
George W. Bush speaking to Swedish Prime Minister unaware a live television camera was still rolling, June 14, 2001
[Selfcode](http://community.de.selfhtml.org/fanprojekte/selfcode.htm): ie:% fl:( br:> va:) ls:& fo:) rl:? n4:& ss:| de:] js:| ch:? sh:( mo:) zu:)