Help for this page

Select Code to Download


  1. or download this
    if (!open(my $fh, '<', $qfn)) {
       ...
    }
    
    print $fh $s;  # XXX
    
  2. or download this
    if (my ($y) = f($x)) {   # Returns () on error.
       ...
    }
    
    print defined($y) ? $y : '[undef]';  # XXX
    
  3. or download this
    my $fh;
    if (!open($fh, '<', $qfn)) {
       ...
    }
    
  4. or download this
    my $y;
    if (($y) = f($x)) {   # Returns () on error.
       ...
    }
    
  5. or download this
    my $success = open(my $fh, '<', $qfn);
    if (!$success) {
       ...
    }
    
  6. or download this
    my $success = my ($y) = f($x);  # Returns () on error.
    if (!$success) {
       ...
    }
    
  7. or download this
    open(my $fh, '<', $qfn)
       or do { ...
             };
    
  8. or download this
    my ($y) = f($x)   # Returns () on error.
       or do { ...
             };