Help for this page

Select Code to Download


  1. or download this
    open(FILE, '>', 'temp.txt')
       or die("Can't create output file: $!");
    ...
       my ($fh) = @_;
       print $fh "Hello World\n";
    }
    
  2. or download this
    sub foo { print("Hello World\n"); }
    
    *bar = \&foo;
    
    bar();
    
  3. or download this
    open(my $file, '>', 'temp.txt')
       or die("Can't create output file: $!");
    ...
       my ($fh) = @_;
       print $fh "Hello World\n";
    }