Help for this page

Select Code to Download


  1. or download this
    # use this form of foreach instead of 'my $FH = $_'
    foreach my $FH (@files) {
    ...
        # we should report that fact.
        warn "File '$FH' contained unexecuted commands:\n$batch\n";
    }
    
  2. or download this
    foreach my $FH (@files) {
        open my $FILE, '<', $FH or die("Cannot read $FH: $!");
    ...
            # error handling here
        }
    }