123456789101112131415161718192021
#!/usr/bin/perluse warnings;use strict;sub hprint; # h fuer havi... :-)my $string = "Test";open(LGD, ">Logdatei.txt") or die $!;if ($string eq "Test") { hprint "OK\n";} # ifelse { hprint "KO\n";} # elseclose(LGD) or die $!;sub hprint { print @_; print LGD @_;} # sub hprint