Help for this page

Select Code to Download


  1. or download this
    sub nasty1 {
        close STDOUT;
    ...
    
    nasty1();
    print "everybody keep silent"; # maybe you get a warning that STDOUT w
    +as closed
    
  2. or download this
    sub nasty2 {
        open my $fh, '>', 'output.txt' or die $!;
    ...
    
    nasty2();
    print "everybody keep silent"; # this shows up in the output file