<span id="7ztzv"></span>
<sub id="7ztzv"></sub>

<span id="7ztzv"></span><form id="7ztzv"></form>

<span id="7ztzv"></span>

        <address id="7ztzv"></address>


            ?????? ?????§Õ

            ?????????????
            ?????????
            ????§Õ???
            ????§Ø??????
            ?‰]?????§Ó???
            ?????????

            ?????????????
              ???open (filevar, filename)??????filevar???????????????????????????????????????filename??????????¡¤????????¡¤????????????¡¤????
                open(FILE1,"file1");
                open(FILE1, "/u/jqpublic/file1");
              ???????????????????????PERL???????????????????§Õ????????????????????????§Õ??????????????????????????????open(outfile,">outfile");??????????????????¦Â????????????????????open(appendfile, ">>appendfile")???????????????????????§Ø???§Õ/????????
              open????????????????????????????????????????????????????????????????????§Ø??
                if (open(MYFILE, "myfile")) {
                # here's what to do if the file opened successfully
                }
              ???????????????????
                unless (open (MYFILE, "file1")) {
                die ("cannot open input file file1\n");
                }
              ?????????????????????¡ê?
                open (MYFILE, "file1") || die ("Could not open file");
              ???????????????close(MYFILE); ????????
            ?????????
              ???$line = <MYFILE>;??????§Ø?????????›¥????????$line?§Ó?????????????????§³?<STDIN>??????????????????????????????????
              ???@array = <MYFILE>;?????????????????????@array???????????(???????)?@array?????????
            ????§Õ???
              ??????
                open(OUTFILE, ">outfile");
                print OUTFILE ("Here is an output line.\n");
              ???STDOUT??STDERR???????????????????????????????????????
            ????§Ø??????
            1??????????????
              ?????-op expr???»Ç
                if (-e "/path/file1") {
                print STDERR ("File file1 exists.\n");
                }

            ????????????

            ?????? ????
            -b ???????õô
            -c ????????õô
            -d ??????
            -e ??????
            -f ??????????
            -g ?????????setgid¦Ë
            -k ?????????sticky¦Ë
            -l ????????????
            -o ?????§Ú????
            -p ???????
            -r ?????
            -s ?????
            -t ????????
            -u ?????????setuid¦Ë
            -w ????§Õ
            -x ???????
            -z ?????????
            -A ????¦Ç???????
            -B ?????????????
            -C ????¦Ç????????inode?????
            -M ????????????
            -O ???????????????????????
            -R ?????§³???????????????
            -S ????socket
            -T ??????????
            -W ??????"?????????"??§Õ
            -X ??????"?????????"?????
            ??????????????????????????userid????????????ID????????suid????????§¹???ID??

              ????
                unless (open(INFILE, "infile")) {
                die ("Input file infile cannot be opened.\n");
                }
                if (-e "outfile") {
                die ("Output file outfile already exists.\n");
                }
                unless (open(OUTFILE, ">outfile")) {
                die ("Output file outfile cannot be opened.\n");
                }
              ?????
                open(INFILE, "infile") && !(-e "outfile") &&
                open(OUTFILE, ">outfile") || die("Cannot open files\n");
            ?‰]?????§Ó???
              ??C?????PERL??§Õ›¥?????§Ó?????????@ARGV???????????????????????§Ó???????C????????$ARGV[0]????????????????????????????
                $var = $ARGV[0]; # ?????????
                $numargs = @ARGV; # ?????????
              PERL?§µ?<>??????????????????@ARGV??????????????�a????????
            1????PERL??????????¦Ï???<>???????$ARGV[0]?????????????
            2????§Ø???shift(@ARGV); ????????@ARGV??????????????????????????????????????
            3??<>???????????????????????§Ö??????§³?
            4??????????????????????????
              ????
                @ARGV = ("myfile1", "myfile2"); #????????????§Ó??????
                while ($line = <>) {
                print ($line);
                }
              ???????myfile1??myfile2??????????????
            ?????????
              ?¨®?????????????????????????????¨´??(ex:ls > tempfile)???????open (MYPIPE, "| cat >hello"); ???????????????MYPIPE????????????"cat >hello"??????????cat???????????????????????????????open(MYPIPE, ">hello"); ?¨´????????????¡ê?
                open (MESSAGE, "| mail dave");
                print MESSAGE ("Hi, Dave! Your Perl program sent this!\n");
                close (MESSAGE);

            ????? ????? Perl???


            paper | appdir | ssv
            <span id="7ztzv"></span>
            <sub id="7ztzv"></sub>

            <span id="7ztzv"></span><form id="7ztzv"></form>

            <span id="7ztzv"></span>

                  <address id="7ztzv"></address>

                      ÑÇÖÞÅ·ÃÀÔÚÏß