Help for this page

Select Code to Download


  1. or download this
    {
        local *INPUT;
        open (INPUT, "file.ext") or warn "Cannot open file: $!" && return;
        print while (<INPUT>);
        close INPUT;
    }
    
  2. or download this
    {
        local *INPUT;
        if (open(INPUT, "file.ext")) {
    ...
    #        print "Couldn't open file: $!";
    #    }
    }