Help for this page

Select Code to Download


  1. or download this
    open(my $log_handle, '>>', $filename)
      or die "can't open log file \"$filename\" for appending: $!";
    
  2. or download this
    #! /usr/bin/perl
    use strict;
    ...
    print $log_handle $string;
    
    close $log_handle; # or let $log_handle fall out of scope