Help for this page

Select Code to Download


  1. or download this
    use autodie;
    use File::Copy 'copy';
    my $append = ...;  # If true append, else overwrite.
    open my $fh, $append ? ">>" : ">", LOG;
    copy "tmp", $fh;
    
  2. or download this
    my $append = ...;  # If true append, else overwrite.
    system "cat tmp " . ($append ? ">>" : ">") . " LOG" and die;