Help for this page

Select Code to Download


  1. or download this
    my ($content, $IN);
    unless (open ($IN, "<", $file)) {
    ...
      $content = <$IN>;
      close ($IN);
    } # else
    
  2. or download this
    unless (open ($IN, "<", "file1.txt")) {
      die "Error in reading 'file1.txt': $!\n";
    } # unless