Help for this page

Select Code to Download


  1. or download this
    my $output_file = 'demo.txt';
    
    open(my $out_fh, '>', $output_file)
        or die "Cannot open file '$output_file' for writing: $!";
    
  2. or download this
    print $out_fh "\$ENV{$key} = $ENV{$key}\n";
    
  3. or download this
    close $out_fh
        or die "Cannot close file '$output_file': $!";