Help for this page

Select Code to Download


  1. or download this
    open $fh, '<', $file or die $!; 
    process($fh) if is_valid($fh);
    
  2. or download this
    die $! unless open $fh, '<', $file; 
    is_valid($fh) and process($fh);
    
  3. or download this
    my $data;
    {
      local $/;
      open my $fh, '<', $file or die $!;
      $data = <$fh>;
    }